src/Http/Middleware/CheckIfAdmin.php
public function handle($request, Closure $next, $guard = 'canvas')
    {
        if (! User::isAdmin(Auth::guard($guard)->user()->role)) {
            return redirect()->route('canvas.admin');
        }

        return $next($request);
    }
public function handle($request, Closure $next, $guard = 'canvas')
    {
        if (! User::isAdmin(Auth::guard($guard)->user()->role)) {
            return redirect()->route('canvas.admin');
        }

        return $next($request);
    }
Handle an incoming request.

@param  \Illuminate\Http\Request  $request
@param  \Closure  $next
@return mixed