Framework: lumen Session store not set on requst

Created on 10 Oct 2016  路  1Comment  路  Source: laravel/framework

  • Laravel Version: #.
  • PHP Version:
  • Database Driver & Version:

    Description:

I used Lumen 5.2 version,
in .env file ,the SESSION_DRIVER set file ,SESSION_DRIVER=file
in app/Http/routes.php file ,$app->get("/setSession","DemoController@SetSession");
in app/http/Controller/DemoController file the code is
public function SetSession(Request $request){
$request->session()->put('key', 'value');
}
where request, the error is
Whoops, looks like something went wrong.

1/1
RuntimeException in Request.php line 870:
Session store not set on request.
this problem how to repair
Steps To Reproduce:

Most helpful comment

Lumen 5.2 represents a more decided shift towards focusing on stateless APIs. Therefore, sessions have been removed from the framework. If you would like to use these features, you should upgrade your Lumen 5.1 application to Laravel 5.2.

https://lumen.laravel.com/docs/5.3/upgrade#upgrade-5.2.0

It sounds like you need Laravel instead ;)

>All comments

Lumen 5.2 represents a more decided shift towards focusing on stateless APIs. Therefore, sessions have been removed from the framework. If you would like to use these features, you should upgrade your Lumen 5.1 application to Laravel 5.2.

https://lumen.laravel.com/docs/5.3/upgrade#upgrade-5.2.0

It sounds like you need Laravel instead ;)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gabriellimo picture gabriellimo  路  3Comments

ghost picture ghost  路  3Comments

RomainSauvaire picture RomainSauvaire  路  3Comments

klimentLambevski picture klimentLambevski  路  3Comments

Fuzzyma picture Fuzzyma  路  3Comments