File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
namespace Laravelcm \Subscriptions ;
6
6
7
+ use Spatie \LaravelPackageTools \Commands \InstallCommand ;
7
8
use Spatie \LaravelPackageTools \Package ;
8
9
use Spatie \LaravelPackageTools \PackageServiceProvider ;
9
10
@@ -12,11 +13,19 @@ final class SubscriptionServiceProvider extends PackageServiceProvider
12
13
public function configurePackage (Package $ package ): void
13
14
{
14
15
$ 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
+ });
16
23
}
17
24
18
25
public function bootingPackage (): void
19
26
{
20
- $ this ->loadMigrationsFrom (__DIR__ .'/../database/migrations ' );
27
+ if ($ this ->app ->runningInConsole ()) {
28
+ $ this ->loadMigrationsFrom (__DIR__ .'/../database/migrations ' );
29
+ }
21
30
}
22
31
}
You can’t perform that action at this time.
0 commit comments