Skip to content

Commit f159a7e

Browse files
author
Harvey Dobson
committed
Resolution for issue vyuldashev#48. Same occurs in Laravel 9. Not sure why not fixed already... original suggestion fixes the issue.
1 parent d57f03e commit f159a7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Console/SchemaFactoryMakeCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ protected function buildClass($name)
3535

3636
protected function buildModel($output, $model)
3737
{
38-
$model = Str::start($model, $this->laravel->getNamespace());
38+
$namespace = app()::VERSION[0] >= 8 ? $this->laravel->getNamespace(). 'Models\\' : $this->laravel->getNamespace();
39+
$model = Str::start($model, $namespace);
3940

4041
if (! is_a($model, Model::class, true)) {
4142
throw new InvalidArgumentException('Invalid model');

0 commit comments

Comments
 (0)