Closed Mokei-it closed 3 years ago
Hello,
if you try to go directly to http://localhost:8000/admin before login, you get an ErrorException.
To get a better answer from server what do you think to modify \vendor\rezaamini-ir\laravel-easypanel\src\Http\Middleware\isAdmin.php
from `
public function handle($request, Closure $next) { if(!AuthFacade::checkIsAdmin(auth()->user()->id)){ return redirect(config('easy_panel.redirect_unauthorized')); } return $next($request); }
`
to `
public function handle($request, Closure $next) { if(!Auth::check()) { return redirect('login'); }else{ if(!AuthFacade::checkIsAdmin(auth()->user()->id)){ return redirect(config('easy_panel.redirect_unauthorized')); } } return $next($request); }
` Thank you!
Thanks to share your idea. I will take a look and make a decision for this part of project
Hello,
if you try to go directly to http://localhost:8000/admin before login, you get an ErrorException.
To get a better answer from server what do you think to modify \vendor\rezaamini-ir\laravel-easypanel\src\Http\Middleware\isAdmin.php
from `
`
to `
` Thank you!