Skip to content

Commit 151954f

Browse files
committed
friendly comment about using the --force if a view, model or controller already exists
1 parent 2c30f21 commit 151954f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Commands/CreateControllerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ protected function hasErrors(Resource $resource, $destenationFile)
172172
}
173173

174174
if ($this->alreadyExists($destenationFile)) {
175-
$this->error('The controller already exists!');
175+
$this->error('The controller already exists! To override the existing file, use --force option.');
176176

177177
$hasErrors = true;
178178
}

src/Commands/CreateModelCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ protected function hasErrors(Resource $resource, $destenationFile)
115115
}
116116

117117
if ($this->alreadyExists($destenationFile)) {
118-
$this->error('The model already exists!');
118+
$this->error('The model already exists! To override the existing file, use --force option.');
119119

120120
$hasErrors = true;
121121
}

src/Commands/CreateViewLayoutCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function handle()
4545
$destenationFile = $path . $input->layoutFileName;
4646

4747
if ($this->alreadyExists($destenationFile)) {
48-
$this->error('The layout already exists!');
48+
$this->error('The layout already exists! To override the existing file, use --force option.');
4949

5050
return false;
5151
}
@@ -70,7 +70,7 @@ public function handle()
7070
protected function makeFile($filename, $content, $force)
7171
{
7272
if ($this->fileExists($filename, $force)) {
73-
throw new Exception('The destenation file already exists. To override the existing file, pass "--force" option.');
73+
throw new Exception('The destination file already exists. To override the existing file, pass "--force" option.');
7474
}
7575

7676
if (!File::put($filename, $content)) {

0 commit comments

Comments
 (0)