I work in huge project , I have make relationship between account table and almost all tables,
I have to set this in every controller:
account::find(session("LoggedUser"))->relationship_table();
And it's very annoying, so is there any way to make it cleaner without repetition like global variable example:
//some where global
$user = account::find(session("LoggedUser"));
//in any controller
$user->relationship_table();
Or any idea with EXAMPLE please.