在向会话添加数据后重定向时,Laravel会话不会保留

I am trying to save some key => values in the session before i redirect to Twitter OAUth page. The session is not persisting any data.

I have tested this in centos, ubuntu both running php5.6

PHP 5.6.16 (cli) (built: Nov 26 2015 08:01:30) Copyright (c) 1997-2015 The PHP Group

Apache version Server version: Apache/2.4.18 (CentOS) Server built: Dec 14 2015 18:39:31

I get no errors, the storage folder is writable and i get not errors at all.

Can someone please help me with this issues.

It turns out that no file is being written ("storage/framework/sessions").

The value 'driver' => env('SESSION_DRIVER', 'file'), is coming through, it doesn't work either if i change it to 'driver' => 'file',

Thanks

In order to get the Session working, the routes are supposed be declared within the following definition in routes.php

    Route::group(['middleware' => ['web']], function () { 

    });

Thanks