How i can get model of current logged in user? For example if there are two types of users in system staff and admin? how would i know from which model user belongs?
Auth::user()->?
How i can get model of current logged in user? For example if there are two types of users in system staff and admin? how would i know from which model user belongs?
Auth::user()->?
Try to use instanceof
.
if (Auth::user() instanceof Admin) {
// DO something
}
if (Auth::user() instanceof Staff) {
// DO another
}