We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8b8a77a + f093ddf commit c255bf5Copy full SHA for c255bf5
src/Generators/DataTablesMakeCommand.php
@@ -361,6 +361,11 @@ protected function getModel()
361
return $this->option('model');
362
}
363
364
+ // check if model namespace is not set in command and Models directory already exists then use that directory in namespace.
365
+ if ($modelNamespace == '') {
366
+ $modelNamespace = is_dir(app_path('Models')) ? 'Models' : $rootNamespace;
367
+ }
368
+
369
return $model
370
? $rootNamespace . '\\' . ($modelNamespace ? $modelNamespace . '\\' : '') . Str::singular($name)
371
: $rootNamespace . '\\User';
0 commit comments