File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 44
55namespace Laravelcm \Subscriptions ;
66
7+ use Spatie \LaravelPackageTools \Commands \InstallCommand ;
78use Spatie \LaravelPackageTools \Package ;
89use Spatie \LaravelPackageTools \PackageServiceProvider ;
910
@@ -12,11 +13,19 @@ final class SubscriptionServiceProvider extends PackageServiceProvider
1213 public function configurePackage (Package $ package ): void
1314 {
1415 $ package ->name ('laravel-subscriptions ' )
15- ->hasConfigFile ('laravel-subscriptions ' );
16+ ->hasConfigFile ('laravel-subscriptions ' )
17+ ->hasInstallCommand (function (InstallCommand $ command ): void {
18+ $ command
19+ ->publishConfigFile ()
20+ ->publishMigrations ()
21+ ->askToStarRepoOnGitHub ('laravelcm/laravel-subscriptions ' );
22+ });
1623 }
1724
1825 public function bootingPackage (): void
1926 {
20- $ this ->loadMigrationsFrom (__DIR__ .'/../database/migrations ' );
27+ if ($ this ->app ->runningInConsole ()) {
28+ $ this ->loadMigrationsFrom (__DIR__ .'/../database/migrations ' );
29+ }
2130 }
2231}
You can’t perform that action at this time.
0 commit comments