title: Laravel session expires immediately (Laravel 5.5)
body: <p>I have created my custom model to log in the users. I am using sqlite as database. "users" table has "id" column and I am not using eloquent so I have changed the driver as "database" and table as "users" in auth.config file.</p>
  
  <p>My index controller checks the user if it is logged in. If not, redirects to the login page. Once the login form is submitted (ajax call), if the user enter wrong username or password, it gets error message in a modal telling it has entered wrong credentials. If the username and password are true, it redirects to the index page. But because the user is not assumed as logged in, again it redirects to the login page. Also I tried to echo the id of the user after the successful attempt (without redirecting), and it displayed without problem. But after visiting the index page, I am redirected to login page again.</p>
  
  <p>I have tried to add session and display it so if I call the following code;</p>
  
  <pre><code>session()-&gt;put('foo', 'bar');
  echo session()-&gt;get('foo');
  </code></pre>
  
  <p>"bar" is echoed on the page. But if I echo the session on another page (without putting a new session because I have already added), "bar" is not echoed on the page.</p>
  
  <p>Also note that no files are stored in "storage/framework/sessions" folder.</p>
  
  <p>Session type is file and lifetime is 720.I have also tried "cookie" and "database". The same problem occured with "cookie" but I got "database driver cannot be used" exception with "database" driver (I have successfully migrated the necessary tables).</p>
  
  <p>Also the website is on localhost (Windows 10). So I do not think folder permissions can be a problem. Also I have another Laravel (older version - it must be 5.4 I think) on the same pc and it is working without problem. Both are using php 7 and nginx server.</p>