I have this Controller:
class AdminLoginController extends Controller
{
public function index() {
return view('auth.admin.login');
}
}
route\web
Route::get('/admin/login', 'Auth\AdminLoginController@index')->name('admin.login');
I am using spatie
How do I do it that if the logged in user is not 'Super Admin'
> Auth::user()->hasRole('Super Admin')
The application should display Access Denied. But if its super admin, it should redirect to dashboard.
How can I get this done?
Thanks