im working in a app the uses ACL, and im loading my permissions on Auth Service Provider.
My php is:
$permissions = Permission::with('roles')->get();
Im getting a 500 error, and this is because in my permissions i still dont have roles associated with the permissions, I tried to check if there is a better way in using eager loading without still having roles? Is there a method that case it doesnt exists still gives me the permissions records and the roles empty or something?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire