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:
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.
It sounds like you need Laravel instead ;)
Most helpful comment
It sounds like you need Laravel instead ;)