From 92e14f248d01673938f873afe5b715509eb51cba Mon Sep 17 00:00:00 2001 From: Arthur Monney Date: Tue, 3 Oct 2023 08:20:21 +0200 Subject: [PATCH] Add load migrations for app run in console --- src/SubscriptionServiceProvider.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/SubscriptionServiceProvider.php b/src/SubscriptionServiceProvider.php index 06b4856..fb06f9c 100755 --- a/src/SubscriptionServiceProvider.php +++ b/src/SubscriptionServiceProvider.php @@ -21,4 +21,11 @@ public function configurePackage(Package $package): void ->askToStarRepoOnGitHub('laravelcm/laravel-subscriptions'); }); } + + public function bootingPackage(): void + { + if ($this->app->runningInConsole()) { + $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); + } + } }