title: EncryptCookie and Session in laravel 5.2
body: <p>I am using laravel 5.2 and I have problems with working with larvel sessions.</p>
  
  <p>I am trying to get session id using <code>Session::getId()</code> in laravel but every time I refresh the page I get a diffrent value. I commented the <code>EncryptCookies::class</code> middleware it worked fine.</p>
  
  <p>In <code>config\session.php</code>  I change the domain to my site domain <code>ddev.dev</code> and the path is set to '\'.</p>
  
  <p>[EDIT]</p>
  
  <p>In SessionHandler::class middleware I echo the session id.
  here is my <code>app\Http\kernel.php</code>:</p>
  
  <pre><code>protected $middleware = [
      \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
      \Dideo\Http\Middleware\EncryptCookies::class,
      \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
      \Illuminate\Session\Middleware\StartSession::class,
      \Illuminate\View\Middleware\ShareErrorsFromSession::class,
      \Dideo\Http\Middleware\VerifyCsrfToken::class,
      \Dideo\Http\Middleware\GlobalConfig::class,
      \Dideo\Http\Middleware\SessionHandler::class,
  ];
  </code></pre>