protected function registerRawSessionDriver()
 {
     $namespace = $this->app['config']['session.raw'];
     if ($namespace !== false && $this->app['config']['session.driver'] == 'raw') {
         Session::extend('raw', function ($app) use($namespace) {
             return new RawSessionHandler($namespace);
         });
     }
 }
 public function register()
 {
     Session::extend('database_event', function ($app) {
         $connection = $app['config']['session.connection'];
         $db = $app['db']->connection($connection);
         $table = $db->getTablePrefix() . $app['config']['session.table'];
         return new PdoEventSessionHandler($db->getPdo(), array('db_table' => $table, 'db_id_col' => 'id', 'db_data_col' => 'payload', 'db_time_col' => 'last_activity'));
     });
 }