Skip to content

Commit d8bd69b

Browse files
Craig SmithCraig Smith
Craig Smith
authored and
Craig Smith
committed
fix: The "soft-deletes" option does not exist. #112
1 parent 9f2ed83 commit d8bd69b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Generator/ApiControllerMakeCommand.php

+13-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ protected function getStub()
120120
if ($this->option('parent')) {
121121
$stub = 'controller.nested.api.stub';
122122
}
123-
if($this->option('soft-deletes')) {
123+
if ($this->option('soft-deletes')) {
124124
$stub = 'controller.api.soft-deletes.stub';
125125
}
126126

@@ -206,4 +206,16 @@ protected function addRoutes(): void
206206
fclose($fileResource);
207207
$this->info('Routes added successfully.');
208208
}
209+
210+
/**
211+
* Get the console command options.
212+
*
213+
* @return array
214+
*/
215+
protected function getOptions()
216+
{
217+
$options = parent::getOptions();
218+
$options[] = ['soft-deletes', null, InputOption::VALUE_NONE, 'Enable Soft Deletes'];
219+
return $options;
220+
}
209221
}

0 commit comments

Comments
 (0)