File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " pxlrbt/laravel-db -state" ,
2
+ "name" : " pxlrbt/laravel-database -state" ,
3
3
"description" : " Seed critical state for your production DBs." ,
4
4
"keywords" : [
5
5
" pxlrbt" ,
6
6
" db" ,
7
7
" seed"
8
8
],
9
- "homepage" : " https://github.com/pxlrbt/laravel-db -state" ,
9
+ "homepage" : " https://github.com/pxlrbt/laravel-database -state" ,
10
10
"license" : " MIT" ,
11
11
"authors" : [
12
12
{
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ return [
4
+ 'run_after_migration ' => true ,
5
+ ];
Original file line number Diff line number Diff line change @@ -19,15 +19,19 @@ public function configurePackage(Package $package): void
19
19
* More info: https://github.com/spatie/laravel-package-tools
20
20
*/
21
21
$ package
22
- ->name ('laravel-db-state ' )
22
+ ->name ('database-state ' )
23
+ ->hasConfigFile ()
23
24
->hasCommands ([
24
25
Commands \MakeCommand::class,
25
26
Commands \SeedDatabaseStateCommand::class
26
27
]);
27
28
}
28
29
29
- public function bootingPackage ()
30
+ public function packageBooted ()
30
31
{
32
+ if (config ('database-state.run_after_migration ' ) !== true ) {
33
+ return ;
34
+ }
31
35
32
36
Event::listen (
33
37
CommandFinished::class,
You can’t perform that action at this time.
0 commit comments