public function __construct()
{
if (Auth::check()){
if(Auth::user()->user_type == 'admin'){
return to_route('admin.dashboard');
} elseif(Auth::user()->user_type == 'operator'){
return to_route('operator.dashboard');
}
}
}
I am checking user authentication.