-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit features a new updater which allows you to republish the views, resources, language files and routes with a single command. Please note that at this moment the updater will override everything previously installed by the installer and any changes which were applied to the file.
- Loading branch information
1 parent
eba37bf
commit ddd5aec
Showing
2 changed files
with
49 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
namespace Proxeuse\FortifyUITabler\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class FortifyUITablerUpdateCommand extends Command | ||
{ | ||
public $signature = 'fortify-ui:tabler-update'; | ||
|
||
public $description = 'Update views, resources and routes for the Tabler.io framework.'; | ||
|
||
public function handle() | ||
{ | ||
// confirm the installation | ||
if ($this->confirm('Do you wish to continue? This updater will try to overwrite existing views, resources, language files and routes.', true)) { | ||
// install fortifyUI | ||
\Artisan::call('fortify-ui:install'); | ||
$this->info('FortifyUI has been updated. Proceeding to update Tabler.io.'); | ||
|
||
// publish the assets, routes, controllers, etc. | ||
$this->publishAssets(); | ||
|
||
// create symbolic link | ||
\Artisan::call('storage:link'); | ||
|
||
// Clear the Route cache | ||
\Artisan::call('route:clear'); | ||
\Artisan::call('route:cache'); | ||
|
||
// print success message | ||
$this->info('The Tabler.io Framework is now updated.'); | ||
$this->newLine(); | ||
$this->line('Please run php artisan migrate before continuing.'); | ||
} else { | ||
// print abort message | ||
$this->error('Update is aborted'); | ||
} | ||
} | ||
|
||
protected function publishAssets() | ||
{ | ||
$this->callSilent('vendor:publish', ['--tag' => 'fortify-ui-tabler-resources', '--force' => true]); | ||
} | ||
} |
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