Skip to content

Commit

Permalink
fix command - add suggestion at the end to publish CSS and JS assets
Browse files Browse the repository at this point in the history
  • Loading branch information
tabacitu committed Mar 30, 2022
1 parent ab598e2 commit 3cd1fd4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/app/Console/Commands/Fix.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Backpack\CRUD\app\Console\Commands;

use Artisan;
use Illuminate\Console\Command;

class Fix extends Command
Expand All @@ -18,7 +19,7 @@ class Fix extends Command
*
* @var string
*/
protected $description = 'Fix known Backpack security issues.';
protected $description = 'Fix known Backpack issues.';

/**
* Execute the console command.
Expand All @@ -28,6 +29,15 @@ class Fix extends Command
public function handle()
{
$this->fixErrorViews();

if ($this->confirm('[SUGGESTION] Would you like to publish updated JS & CSS dependencies to public/packages?', false)) {
Artisan::call('vendor:publish', [
'--provider' => 'Backpack\CRUD\BackpackServiceProvider',
'--tag' => 'assets',
'--force' => 'true',
]);
$this->info('Published latest CSS and JS assets to your public/packages directory.');
}
}

private function fixErrorViews()
Expand Down

0 comments on commit 3cd1fd4

Please sign in to comment.