I am doing a project in laravel and using backpack for making admin panel. I have a table named users and another table user_details in which primary key of users table is used as a foreign key. My question is that how can i access details of a particular user from parent table id. In laravel auth and backpack, I can do stuff like
auth()->user()->id;
or for backpack I can use
backpack()->user()->id;
Similarly I thought i would be able to get all columns of user_details page by doing this:
backpack()->user()->user_details;
But it's not working this way ?? Any help will be greatly appreciated!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire