From c491f1f1cd16cc4a3d3dc52cf9c453d0d95c003e Mon Sep 17 00:00:00 2001 From: overtrue Date: Mon, 22 Jan 2024 08:51:31 +0800 Subject: [PATCH] Disable auto migration. Thanks @fbeckklaus #43 --- src/FavoriteServiceProvider.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/FavoriteServiceProvider.php b/src/FavoriteServiceProvider.php index b1fd8b2..7775e8b 100644 --- a/src/FavoriteServiceProvider.php +++ b/src/FavoriteServiceProvider.php @@ -6,7 +6,7 @@ class FavoriteServiceProvider extends ServiceProvider { - public function boot() + public function boot(): void { $this->publishes([ \dirname(__DIR__).'/config/favorite.php' => config_path('favorite.php'), @@ -15,13 +15,9 @@ public function boot() $this->publishes([ \dirname(__DIR__).'/migrations/' => database_path('migrations'), ], 'favorite-migrations'); - - if ($this->app->runningInConsole()) { - $this->loadMigrationsFrom(\dirname(__DIR__).'/migrations/'); - } } - public function register() + public function register(): void { $this->mergeConfigFrom( \dirname(__DIR__).'/config/favorite.php',