public function handle(Request $request, Closure $next)
    {
        if (!$this->auth->check()) {
            Flash::error(trans('dashboard::dashboard.flash.access_denied'));

            return redirect()->route('auth.login');
        }

        return $next($request);
    }
public function handle(Request $request, Closure $next)
    {
        if (!$this->auth->check()) {
            Flash::error(trans('dashboard::dashboard.flash.access_denied'));

            return redirect()->route('auth.login');
        }

        return $next($request);
    }
public function handle ( Request $ request , Closure $ next ) { if ( ! $ this -> auth -> check ( ) ) { Flash :: error ( trans ( 'dashboard::dashboard.flash.access_denied' ) ) ; return redirect ( ) -> route ( 'auth.login' ) ; } return $ next ( $ request ) ; }
Check if a user is logged in.

@param Request $request
@param Closure $next

@return \Illuminate\Http\RedirectResponse
Check if a user is logged in .