title: Laravel cookie session lifetime
body: <p>I used my Laravel as a OAuth2 client, and I need to keep token i cookies. So, I set driver to cookie and keep default value for lifetime 120</p>
  
  <p>When any user check remember me on login, I tried to change lifetime with code:</p>
  
  <pre><code>    $lifetime = time() + 60 * 60 * 24 * 365;// one year
      Config::set('session.lifetime', $lifetime);
  </code></pre>
  
  <p>But without success. In any another controller I checked value of lifetime and every time I get default value.</p>
  
  <pre><code>\Log::info(\Config::get('session.lifetime'));
  </code></pre>
  
  <p><strong>Edit #1:</strong></p>
  
  <p>It is enough?</p>
  
  <pre><code>if(Input::has('rememberMe')) {
     $lifetime = time() + 60 * 60 * 24 * 365; // one year
     Session::put('Expires', $lifetime);
  }
  </code></pre>
  
  <p><strong>Edit #2:</strong></p>
  
  <p>I put acess_token key on the same way as Expires in example above, like:</p>
  
  <pre><code>public function signin() {
  
      /**
       * Code for getting *client_code* and *client_state* from API server
       */
  
      $access_token = $this-&gt;provider-&gt;getAccessToken('authorization_code', $form_data);
  
      // $access_token is object and contain all data (access_token, refresh_token, expires)
      Session::put('access_token', $access_token);
      Session::put('refresh_token', $access_token-&gt;refreshToken);
      Session::put('token_expires', $access_token-&gt;expires);
  
      if(Input::has('rememberMe')) {
         $lifetime = time() + 60 * 60 * 24 * 365; // one year
         Session::put('expires', $lifetime);
      }
  
  
      return Response....
  
  }
  </code></pre>
  
  <p>This is the 'default' Laravel session (I changed driver from <em>file</em> to <em>cookie</em> in /app/config/session.php). I know life time should be set in /app/config/session.php file, but as you can see I need longer life time for Remember me option</p>