Skip to content

Commit 775978d

Browse files
committed
Confirm 'composer dump-autoload' for resources and controller
1 parent bf0e2c3 commit 775978d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Commands/FileCommand.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ public function handle()
9191

9292
// if we need to run "composer dump-autoload"
9393
if ($this->settings['dump_autoload'] === true) {
94-
$this->composer->dumpAutoloads();
94+
if ($this->confirm("Run 'composer dump-autoload'?")) {
95+
$this->composer->dumpAutoloads();
96+
}
9597
}
9698
}
9799

src/Commands/ResourceCommand.php

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ public function handle()
4848
$this->callSeed();
4949
$this->callMigrate();
5050

51+
// confirm dump autoload
52+
if ($this->confirm("Run 'composer dump-autoload'?")) {
53+
$this->composer->dumpAutoloads();
54+
}
55+
5156
$this->info('All Done!');
5257
$this->info('Remember to add ' . "`Route::resource('" . str_replace('_', '-',
5358
$this->getCollectionName()) . "', '" . $this->getResourceControllerName() . "');`" . ' in `routes\\web.php`');

0 commit comments

Comments
 (0)