Skip to content

Commit

Permalink
Merge pull request barryvdh#443 from pavankumarkatakam/master
Browse files Browse the repository at this point in the history
Option for Custom storage
  • Loading branch information
barryvdh committed Jan 4, 2016
2 parents 6eb8034 + 332ac55 commit 67d5a0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/debugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
*/
'storage' => array(
'enabled' => true,
'driver' => 'file', // redis, file, pdo
'driver' => 'file', // redis, file, pdo, custom
'path' => storage_path() . '/debugbar', // For file driver
'connection' => null, // Leave null for default connection (Redis/PDO)
'provider' => '' // Instance of StorageInterface for custom driver
),

/*
Expand Down
4 changes: 4 additions & 0 deletions src/LaravelDebugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,10 @@ protected function selectStorage(DebugBar $debugbar)
$connection = $config->get('debugbar.storage.connection');
$storage = new RedisStorage($this->app['redis']->connection($connection));
break;
case 'custom':
$class = $config->get('debugbar.storage.provider');
$storage = $this->app->make($class);
break;
case 'file':
default:
$path = $config->get('debugbar.storage.path');
Expand Down

0 comments on commit 67d5a0f

Please sign in to comment.