-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2897b1
commit 1fbe94c
Showing
15 changed files
with
485 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
|
||
use Exception; | ||
|
||
class InvalidJson extends Exception {} | ||
class ColumnNotFoundException extends Exception {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
|
||
use Exception; | ||
|
||
class TableNotFound extends Exception {} | ||
class ColumnsNotAddedException extends Exception {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
|
||
use Exception; | ||
|
||
class ColumnNotFound extends Exception {} | ||
class InvalidJsonException extends Exception {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
|
||
use Exception; | ||
|
||
class ColumnsNotAdded extends Exception {} | ||
class TableNotFoundException extends Exception {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
namespace Davidvandertuijn\LaravelAfterSeeders\app\Console\Commands\AfterSeeders; | ||
|
||
use Illuminate\Console\Command; | ||
use Illuminate\Support\Facades\Config; | ||
|
||
class Deploy extends Command | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $signature = 'after-seeders:deploy'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $description = 'Deploy after seeders'; | ||
|
||
/** | ||
* Handle. | ||
*/ | ||
public function handle(): void | ||
{ | ||
$tags = $this->getTags(); | ||
|
||
if (empty($tags)) { | ||
$this->components->warn('There are no tags available.'); | ||
|
||
return; | ||
} | ||
|
||
foreach ($tags as $tag) { | ||
$this->components->info(sprintf( | ||
'Deployment tag "%s"', | ||
$tag | ||
)); | ||
|
||
$this->call('after-seeders:seed', [ | ||
'--tag' => $tag, | ||
]); | ||
} | ||
} | ||
|
||
/** | ||
* Get Tags. | ||
*/ | ||
public function getTags() | ||
{ | ||
return Config::get('after_seeders.tags'); | ||
} | ||
} |
Oops, something went wrong.