Ejemplo n.º 1
0
 /**
  * Sweep the expired sessions from storage.
  *
  * @param  array  $arguments
  * @return void
  */
 public function sweep($arguments = array())
 {
     $driver = Session::factory(Config::get('session.driver'));
     // If the driver implements the "Sweeper" interface, we know that it
     // can sweep expired sessions from storage. Not all drivers need be
     // sweepers since they do their own.
     if ($driver instanceof Sweeper) {
         $lifetime = Config::get('session.lifetime');
         $driver->sweep(time() - $lifetime * 60);
     }
     echo "The session table has been swept!";
 }