I'm on laravel tinker.
Utilizador means User in English.
When I do Utilizador::all()->last()->subscribed('main')
I get:
BadMethodCallException with message 'Call to undefined method Illuminate\Database\Query\Builder::valid()'
Don't know why.
When I do Utilizador::all()
I get all users and when I do Subscription::all()
I get all subscriptions from the database. So my models seem to be working.
I also have a Utilizadores->subscription relationship and vice-versa
I also have a Utilizadores->subscription relationship and vice-versa
Remove relationships between User
and Subscription
models. These relationships are already defined in the Billable
trait and Subscription
model.