Laravel “The 'name' argument does not exist” Error
Clash Royale CLAN TAG#URR8PPP
Laravel “The 'name' argument does not exist” Error
I am new to Laravel php developent. I have alredy existing mysql database. I heard about ignasbernotas/laravel-model-generator
to generate Eloquent models from existing database.It uses php artisan make:models
command to generate models. But while doing I am getting error The "name" argument does not exist.
.
ignasbernotas/laravel-model-generator
php artisan make:models
The "name" argument does not exist.
https://packagist.org/packages/ignasbernotas/laravel-model-generator
link will all about I tried.
can anyone here help me about this?
php artisan make:models
this is command i am using– Rajadip
Dec 28 '17 at 14:03
php artisan make:models
Looking at the issues of the package, someone suggested using github.com/reliese/laravel instead. Not sure if it will work any better for you.
– aynber
Dec 28 '17 at 14:12
Using github.com/reliese/laravel gives error
In Filesystem.php line 442: mkdir(): Invalid path
– Rajadip
Dec 28 '17 at 14:27
In Filesystem.php line 442: mkdir(): Invalid path
github.com/reliese/laravel/issues/24
– aynber
Dec 28 '17 at 14:43
2 Answers
2
You're definitely using make:model
command. You can't possibly get this error message when using make:models
command from the package.
make:model
make:models
The problem is you're using this command without specifying model name. So, specify model name:
php artisan make:model Article
But php artisan make:model
will not create a model based on existing BD. It will just create a model stub for you.
php artisan make:model
https://laravel.com/docs/5.5/eloquent#defining-models
They're using a package, not the default Laravel artisan commands. The error is regards to the
ignasbernotas/laravel-model-generator
package.– aynber
Dec 28 '17 at 14:02
ignasbernotas/laravel-model-generator
@aynber yes, but OP gets an error because he's using
php artisan make:model
and not packages' command.– Alexey Mezenin
Dec 28 '17 at 14:04
php artisan make:model
No, they're using
make:models
with an s, which is the command for the package.– aynber
Dec 28 '17 at 14:04
make:models
No. Error is while using
ignasbernotas/laravel-model-generator
– Rajadip
Dec 28 '17 at 14:05
ignasbernotas/laravel-model-generator
@aynber if you'll look into Laravel source code and in the package's source code, you'll understand you can get this error only with
make:model
command and you can't possibly get it with make:models
command. Please take a minute and look into source code and remove the downvote if you'll agree with me after learning the package's code.– Alexey Mezenin
Dec 28 '17 at 14:06
make:model
make:models
Package ignasbernotas/laravel-model-generator
is abandoned, you should avoid using it.
ignasbernotas/laravel-model-generator
Use reliese/laravel
instead.
reliese/laravel
Ok. I ll try that one. Thanks.
– Rajadip
Aug 6 at 9:17
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
What is the full command you're using? It may be hard to track this down since the package is abandonware.
– aynber
Dec 28 '17 at 14:02