I am using laravel 5.4 so i'm trying to count number of relations between two models "Person" and "Permanance" so this is how it is called in my controller $persons = Person::all()->withCount('Permanance')->get();
and this is the error i'm getting
(1/1) BadMethodCallException
Method withCount does not exist. in Macroable.php line 74 at Collection->__call('withCount', array('Permanance'))in PermanancesController.php line 41
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/YtQafRv
via IFTTT
Aucun commentaire:
Enregistrer un commentaire