From a70d0c5b55204509f9383f7b1c0a28a517ceabd9 Mon Sep 17 00:00:00 2001 From: Milwad <98118400+milwad-dev@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:34:18 +0330 Subject: [PATCH] Update LaravelCartServiceProvider.php --- src/Providers/LaravelCartServiceProvider.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Providers/LaravelCartServiceProvider.php b/src/Providers/LaravelCartServiceProvider.php index c1b79c1..c4a3e05 100644 --- a/src/Providers/LaravelCartServiceProvider.php +++ b/src/Providers/LaravelCartServiceProvider.php @@ -32,8 +32,14 @@ public function boot(): void ], 'laravel-cart-config'); // Publish Migrations - $this->publishes([ - __DIR__.'/../../database/migrations' => database_path('migrations'), - ], 'laravel-cart-migrations'); + if (version_compare(Application::VERSION, '11.0.0', '<')) { + $this->publishes([ + __DIR__.'/../../database/migrations' => database_path('migrations'), + ], 'laravel-cart-migrations'); + } else { + $this->publishesMigrations([ + __DIR__.'/../../database/migrations' => database_path('migrations'), + ], 'laravel-cart-migrations'); + } } }