2 years ago

How to make my routes implement session in laravel 5.1

Posted 2 years ago by Nasr1

Hello am making a simple Session::flash so i need to make my controller to use middleware , i know i can use middleware web , unfortuentaly am using laravel 5.1 , so web middleware is not exist , so what middleware or what should i do to make my controller or my routes implement session ? this is my kernel file :-

class Kernel extends HttpKernel
            protected $middleware = [

protected $routeMiddleware = [
    'auth' => \App\Http\Middleware\Authenticate::class,
    'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
    'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
    'jwt.auth' => 'Tymon\JWTAuth\Middleware\GetUserFromToken',
'jwt.refresh' => 'Tymon\JWTAuth\Middleware\RefreshToken',

thanks in advance Guys :)

Please sign in or create an account to participate in this conversation.