diff --git a/src/config/audit-queue.php b/config/audit-queue.php similarity index 100% rename from src/config/audit-queue.php rename to config/audit-queue.php diff --git a/src/AuditLogServiceProvider.php b/src/AuditLogServiceProvider.php index bd8c045..236105c 100644 --- a/src/AuditLogServiceProvider.php +++ b/src/AuditLogServiceProvider.php @@ -18,7 +18,7 @@ public function boot() include_once __DIR__ . '/helpers.php'; $this->publishes([ - __DIR__ . '/config/audit-queue.php' => config_path('audit-queue.php'), + __DIR__ . '/../config/audit-queue.php' => config_path('audit-queue.php'), ]); } } diff --git a/src/LogAuditableEvent.php b/src/LogAuditableEvent.php index 1673b4e..9f4092b 100644 --- a/src/LogAuditableEvent.php +++ b/src/LogAuditableEvent.php @@ -34,7 +34,7 @@ public function __construct( ?Model $causer = null, array $props = [] ) { - $this->queue = config('audit-queue.queue'); + $this->queue = config('audit-queue.queue', null); $this->dimension = $dimension; $this->activity = $activity; $this->causer = $causer; diff --git a/tests/TestCase.php b/tests/TestCase.php index aa1d83e..8e05599 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -43,6 +43,7 @@ public function getEnvironmentSetUp($app) $app['config']->set('app.key', 'base64:' . base64_encode( Encrypter::generateKey($app['config']['app.cipher']) )); + $app['config']->set('audit-queue.queue', 'auditlog'); } protected function setUpDatabase()