File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 6
6
use Spargon \AuthLogger \Providers \EventServiceProvider ;
7
7
use Spatie \LaravelPackageTools \Package ;
8
8
use Spatie \LaravelPackageTools \PackageServiceProvider ;
9
+ use Spatie \LaravelPackageTools \Commands \InstallCommand ;
9
10
10
11
class AuthLoggerServiceProvider extends PackageServiceProvider
11
12
{
@@ -17,7 +18,20 @@ public function configurePackage(Package $package): void
17
18
->hasViews ()
18
19
->hasTranslations ()
19
20
->hasMigration ('create_auth_logs_table ' )
20
- ->hasCommand (AuthLoggerCommand::class);
21
+ ->hasCommand (AuthLoggerCommand::class)
22
+ ->hasInstallCommand (function (InstallCommand $ command ) {
23
+ $ command
24
+ ->startWith (function (InstallCommand $ command ) {
25
+ $ command ->info ('Setting up the Laravel Auth Logger package by Spargon! ' );
26
+ })
27
+ ->publishConfigFile ()
28
+ ->publishMigrations ()
29
+ ->askToRunMigrations ()
30
+ ->askToStarRepoOnGitHub ('spargon/laravel-auth-logger ' )
31
+ ->endWith (function (InstallCommand $ command ) {
32
+ $ command ->info ('Have a great day fellow tinkerers! ' );
33
+ });
34
+ });
21
35
}
22
36
23
37
public function packageRegistered ()
You can’t perform that action at this time.
0 commit comments