pass in value in route group middle ware

Solutions on MaxInterview for pass in value in route group middle ware by the best coders in the world

showing results for - "pass in value in route group middle ware"
Mia
23 Feb 2019
1Route::group(['middleware' => 'checkUserLevel:some_value_of_level'], function () {
2            // my routes
3        });
4
Monica
20 Apr 2018
1public function handle($request, Closure $next, $level)
2{
3    $user = Auth::user();
4    if ($user->level > $level) {
5        return redirect('testUrl');
6    }
7
8    return $next($request);
9}
10
similar questions
queries leading to this page
pass in value in route group middle ware