From b17602ff23f581dd1abf37a76c169725384b6887 Mon Sep 17 00:00:00 2001 From: Kath Young Date: Fri, 5 Apr 2024 15:00:38 +1030 Subject: [PATCH] Fixed listener to use correct model, updated README --- README.md | 2 +- tests/Listeners/ServeCommandStartedListener.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f1d0c302..b62ebe6d 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ From the project directory, run `./vendor/bin/pest` ## Interacting with the package During development, you may like to actually interact with the FilaCMS UI. In your console, run -```./vendor/bin/workbench serve``` +```./vendor/bin/testbench serve``` You can now load the application at http://localhost:8000/admin diff --git a/tests/Listeners/ServeCommandStartedListener.php b/tests/Listeners/ServeCommandStartedListener.php index ffe30212..ea97c555 100644 --- a/tests/Listeners/ServeCommandStartedListener.php +++ b/tests/Listeners/ServeCommandStartedListener.php @@ -29,9 +29,10 @@ public function handle(): void Artisan::call('fila-cms:install', ['--publish-config' => true,'--run-migrations' => true,'--add-user-traits' => true]); // Ensure there's an admin user - $admin = User::where('email', 'admin@test.com')->first(); + $userModel = config('auth.providers.users.model'); + $admin = $userModel::where('email', 'admin@test.com')->first(); if(!$admin) { - $admin = new User(); + $admin = new $userModel(); } $admin->email = 'admin@test.com'; $admin->password = Hash::make('password');