I have done laravel auth with is_admin field like:
if(auth()->user()->is_admin == 1){
return $next($request);
}
and defined it in route so if the user is admin, can be redirected to voyager dashboard page.
Route::group(['prefix' => 'admin'], function()
{
Voyager::routes();
Route::get('admin', 'HomeController@admin')->middleware('admin');
});
When I login, it's redirected to specific page but with error message:
Target class [VoyagerController] does not exist.
What should I do to return voyager admin page?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire