mardi 16 avril 2019

Call to undefined relationship [vehicleInfo] on model [App\\Driver]

I have made hasOne relationship in my Model and it is working fine with following query in driver controller:

$drivers = Driver::with('vehicleInfo')->first()->toArray();

But when I try to use same code in AuthController which is generated by Laravel Auth it is giving me error of undefined relationship.

I have included model in AuthController. My relationship is public.

Please help.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire