File tree 1 file changed +10
-1
lines changed
src/Illuminate/Auth/Console
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ class MakeAuthCommand extends Command
14
14
*
15
15
* @var string
16
16
*/
17
- protected $ signature = 'make:auth {--views : Only scaffold the authentication views} ' ;
17
+ protected $ signature = 'make:auth
18
+ {--views : Only scaffold the authentication views}
19
+ {--force : Overwrite existing views by default} ' ;
18
20
19
21
/**
20
22
* The console command description.
@@ -88,6 +90,13 @@ protected function createDirectories()
88
90
protected function exportViews ()
89
91
{
90
92
foreach ($ this ->views as $ key => $ value ) {
93
+
94
+ if (!$ this ->option ('force ' ) && file_exists (resource_path ('views/ ' .$ value ))) {
95
+ if (!$ this ->confirm ('The view ' .$ value .' already exists, Do you wish overwrite it? ' )) {
96
+ continue ;
97
+ }
98
+ }
99
+
91
100
copy (
92
101
__DIR__ .'/stubs/make/views/ ' .$ key ,
93
102
resource_path ('views/ ' .$ value )
You can’t perform that action at this time.
0 commit comments