2

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

alexandre1985
  • 1,056
  • 3
  • 13
  • 31

1 Answers1

0

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.

Alexey Mezenin
  • 158,981
  • 26
  • 290
  • 279