Skip to content

Commit 3cd1fd4

Browse files
committed
fix command - add suggestion at the end to publish CSS and JS assets
1 parent ab598e2 commit 3cd1fd4

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/app/Console/Commands/Fix.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Backpack\CRUD\app\Console\Commands;
44

5+
use Artisan;
56
use Illuminate\Console\Command;
67

78
class Fix extends Command
@@ -18,7 +19,7 @@ class Fix extends Command
1819
*
1920
* @var string
2021
*/
21-
protected $description = 'Fix known Backpack security issues.';
22+
protected $description = 'Fix known Backpack issues.';
2223

2324
/**
2425
* Execute the console command.
@@ -28,6 +29,15 @@ class Fix extends Command
2829
public function handle()
2930
{
3031
$this->fixErrorViews();
32+
33+
if ($this->confirm('[SUGGESTION] Would you like to publish updated JS & CSS dependencies to public/packages?', false)) {
34+
Artisan::call('vendor:publish', [
35+
'--provider' => 'Backpack\CRUD\BackpackServiceProvider',
36+
'--tag' => 'assets',
37+
'--force' => 'true',
38+
]);
39+
$this->info('Published latest CSS and JS assets to your public/packages directory.');
40+
}
3141
}
3242

3343
private function fixErrorViews()

0 commit comments

Comments
 (0)