Skip to content

Commit 67d5a0f

Browse files
committed
Merge pull request barryvdh#443 from pavankumarkatakam/master
Option for Custom storage
2 parents 6eb8034 + 332ac55 commit 67d5a0f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

config/debugbar.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
*/
2929
'storage' => array(
3030
'enabled' => true,
31-
'driver' => 'file', // redis, file, pdo
31+
'driver' => 'file', // redis, file, pdo, custom
3232
'path' => storage_path() . '/debugbar', // For file driver
3333
'connection' => null, // Leave null for default connection (Redis/PDO)
34+
'provider' => '' // Instance of StorageInterface for custom driver
3435
),
3536

3637
/*

src/LaravelDebugbar.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,10 @@ protected function selectStorage(DebugBar $debugbar)
842842
$connection = $config->get('debugbar.storage.connection');
843843
$storage = new RedisStorage($this->app['redis']->connection($connection));
844844
break;
845+
case 'custom':
846+
$class = $config->get('debugbar.storage.provider');
847+
$storage = $this->app->make($class);
848+
break;
845849
case 'file':
846850
default:
847851
$path = $config->get('debugbar.storage.path');

0 commit comments

Comments
 (0)