From 74ccb06ed57f2d29a3a269b5143015cf5abadcb3 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Sun, 13 Nov 2022 11:56:08 +0100 Subject: [PATCH] fix: fix scribe generate on docker image (monicahq/chandler#309) --- app/Console/Commands/SetupApplication.php | 2 +- app/Providers/AppServiceProvider.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/SetupApplication.php b/app/Console/Commands/SetupApplication.php index e521e58681a..3a993770525 100644 --- a/app/Console/Commands/SetupApplication.php +++ b/app/Console/Commands/SetupApplication.php @@ -40,9 +40,9 @@ public function handle(): void $this->clearConfig(); $this->symlink(); $this->migrate(); + $this->documentation(); $this->cacheConfig(); $this->scout(); - $this->documentation(); } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 3d0bddd38a9..662bd14943d 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -12,7 +12,6 @@ use Illuminate\Support\Facades\RateLimiter; use Illuminate\Support\ServiceProvider; use Knuckles\Scribe\Scribe; -use Laravel\Sanctum\Sanctum; use LaravelWebauthn\Facades\Webauthn; class AppServiceProvider extends ServiceProvider @@ -48,7 +47,8 @@ public function boot() '--force' => true, ]); $user = User::first(); - Sanctum::actingAs($user, ['*']); + app('auth')->guard('sanctum')->setUser($user); + app('auth')->shouldUse('sanctum'); // @codeCoverageIgnoreEnd }); }