Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pxlrbt committed Aug 8, 2023
1 parent 3cd3a2b commit ad1cb95
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "pxlrbt/laravel-db-state",
"name": "pxlrbt/laravel-database-state",
"description": "Seed critical state for your production DBs.",
"keywords": [
"pxlrbt",
"db",
"seed"
],
"homepage": "https://github.com/pxlrbt/laravel-db-state",
"homepage": "https://github.com/pxlrbt/laravel-database-state",
"license": "MIT",
"authors": [
{
Expand Down
5 changes: 5 additions & 0 deletions config/database-state.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

return [
'run_after_migration' => true,
];
8 changes: 6 additions & 2 deletions src/DatabaseStateServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@ public function configurePackage(Package $package): void
* More info: https://github.com/spatie/laravel-package-tools
*/
$package
->name('laravel-db-state')
->name('database-state')
->hasConfigFile()
->hasCommands([
Commands\MakeCommand::class,
Commands\SeedDatabaseStateCommand::class
]);
}

public function bootingPackage()
public function packageBooted()
{
if (config('database-state.run_after_migration') !== true) {
return;
}

Event::listen(
CommandFinished::class,
Expand Down

0 comments on commit ad1cb95

Please sign in to comment.