generated from IBEC-BOX/admin-kit-package-skeleton
-
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.
feat: add InstallCommand and more fixes
- Loading branch information
Showing
11 changed files
with
79 additions
and
41 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace AdminKit\Localizations\Commands; | ||
|
||
use AdminKit\Localizations\LocalizationsServiceProvider; | ||
use Illuminate\Console\Command; | ||
|
||
class InstallCommand extends Command | ||
{ | ||
public $signature = 'admin-kit:install-localizations'; | ||
|
||
public $description = 'Install AdminKit Articles package'; | ||
|
||
public function handle(): int | ||
{ | ||
if ($this->confirm('Publishing stubs and migrations?', true)) { | ||
$this->call('vendor:publish', [ | ||
'--provider' => LocalizationsServiceProvider::class, | ||
'--tag' => 'admin-kit-localizations-stubs', | ||
]); | ||
$this->call('vendor:publish', [ | ||
'--provider' => LocalizationsServiceProvider::class, | ||
'--tag' => 'admin-kit-localizations-migrations', | ||
]); | ||
} | ||
|
||
if ($this->confirm('Migrate the database tables?', true)) { | ||
$this->call('migrate'); | ||
} | ||
|
||
if ($this->confirm('(Optional) Publishing config file?')) { | ||
$this->call('vendor:publish', [ | ||
'--provider' => LocalizationsServiceProvider::class, | ||
'--tag' => 'admin-kit-localizations-config', | ||
]); | ||
} | ||
|
||
return self::SUCCESS; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
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