From d45cf0484ab2e2736cfdb07d8e73d72ccd70c8b8 Mon Sep 17 00:00:00 2001 From: Adrian Lynch Date: Fri, 16 Dec 2022 10:09:32 +0000 Subject: [PATCH] Look for notes table config under the correct config key --- src/Models/Note.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Models/Note.php b/src/Models/Note.php index a3cf531..e0da6bf 100644 --- a/src/Models/Note.php +++ b/src/Models/Note.php @@ -75,11 +75,13 @@ public function __construct(array $attributes = []) { parent::__construct($attributes); - $config = config('notes.database', []); + $config = config('notes', []); + $databaseConfig = Arr::get($config, 'database', []); + $notesConfig = Arr::get($config, 'notes', []); - $this->setConnection(Arr::get($config, 'connection')); - $this->setPrefix(Arr::get($config, 'prefix')); - $this->setTable(Arr::get($config, 'table', 'notes')); + $this->setConnection(Arr::get($databaseConfig, 'connection')); + $this->setPrefix(Arr::get($databaseConfig, 'prefix')); + $this->setTable(Arr::get($notesConfig, 'table', 'notes')); } /* -----------------------------------------------------------------