title: How to get session values from database in laravel
body: <p>Here is my code</p>
  
  <pre><code>class CreateSessionsTable extends Migration
  {
  public function up()
      {
          Schema::create('sessions', function (Blueprint $table) {
              $table-&gt;string('id')-&gt;unique();
              $table-&gt;text('payload');
              $table-&gt;integer('last_activity');
          });
      }
      public function down()
      {
          Schema::drop('sessions');
      }
  }
  </code></pre>
  
  <p>In <code>config/session.php</code> file changed <code>'driver' =&gt; env('SESSION_DRIVER', 'database'),</code>
  In DB table was created. 
  When user login i used below code to push values into session</p>
  
  <pre><code>Session::put('userid', $userid);
  Session::put('useremail', $useremail);
  </code></pre>
  
  <p>Then another method i checked session</p>
  
  <pre><code>$data = Session::all();
          var_dump($data);
  </code></pre>
  
  <p>Its returning like this, </p>
  
  <pre><code>array (size=3)
    '_token' =&gt; string 'kD3zC2YF4v63RF1EkAVe0YoM4zLj9kGtiV4vpEzG' (length=40)
    '_previous' =&gt; 
      array (size=1)
        'url' =&gt; string 'http://localhost/Login' (length=28)
    'flash' =&gt; 
      array (size=2)
        'old' =&gt; 
  ...
  </code></pre>
  
  <p>So how to get that user values from db. </p>