Skip to content

Commit ad1cb95

Browse files
committed
wip
1 parent 3cd3a2b commit ad1cb95

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "pxlrbt/laravel-db-state",
2+
"name": "pxlrbt/laravel-database-state",
33
"description": "Seed critical state for your production DBs.",
44
"keywords": [
55
"pxlrbt",
66
"db",
77
"seed"
88
],
9-
"homepage": "https://github.com/pxlrbt/laravel-db-state",
9+
"homepage": "https://github.com/pxlrbt/laravel-database-state",
1010
"license": "MIT",
1111
"authors": [
1212
{

config/database-state.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
return [
4+
'run_after_migration' => true,
5+
];

src/DatabaseStateServiceProvider.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,19 @@ public function configurePackage(Package $package): void
1919
* More info: https://github.com/spatie/laravel-package-tools
2020
*/
2121
$package
22-
->name('laravel-db-state')
22+
->name('database-state')
23+
->hasConfigFile()
2324
->hasCommands([
2425
Commands\MakeCommand::class,
2526
Commands\SeedDatabaseStateCommand::class
2627
]);
2728
}
2829

29-
public function bootingPackage()
30+
public function packageBooted()
3031
{
32+
if (config('database-state.run_after_migration') !== true) {
33+
return;
34+
}
3135

3236
Event::listen(
3337
CommandFinished::class,

0 commit comments

Comments
 (0)