Skip to content

Commit 9414788

Browse files
committed
Option for Custom storage
1 parent 3edaea0 commit 9414788

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
@@ -785,6 +785,10 @@ protected function selectStorage(DebugBar $debugbar)
785785
$connection = $config->get('debugbar.storage.connection');
786786
$storage = new RedisStorage($this->app['redis']->connection($connection));
787787
break;
788+
case 'custom':
789+
$class = $config->get('debugbar.storage.provider');
790+
$storage = app($class);
791+
break;
788792
case 'file':
789793
default:
790794
$path = $config->get('debugbar.storage.path');

0 commit comments

Comments
 (0)