It is project requirement. where i have multiple logins but some user can not access few module. like super admin and analyst can access all module but developer can only use own controller.
so in this case , how can i guard a controller with multiple logins. also note that i have separate login page and table into Database.
for Example phonebookController can be access by super admin and analyst but not by developers. so please tell me how can i implement this?
i use this for ::
if( Auth::guard('superAdmin')->check() )
{ $author =Auth::guard('superAdmin')->User()->id ; }
else if( Auth::guard('analysts')->check() )
{ $author =Auth::guard('analysts')->User()->id; }
else
{ $author =Auth::guard('supervisor')->User()->id }
i want to use this into constructor method of class