I use Lumen 1.0 for an API project.
I have already enable Eloquent by uncomment the following line in bootstrap/app.php file :
$app->withEloquent();
But when I want to create my first model with migration it fails :
php artisan make:model Book --migration
Error message :
[InvalidArgumentException] Command "make:model" is not defined. Did you mean one of these? make:seeder make:migration
Laravel doc about Eloquent (http://laravel.com/docs/5.1/eloquent#defining-models).
Lumen doc (http://lumen.laravel.com/docs/installation) doesn't include Eloquent doc because, it's not enable by default.
Do you have any ideas to avoid this error ?
php artisan --version
Displays :
Laravel Framework version Lumen (5.1.6) (Laravel Components 5.1.*)
You're seeing this error because Lumen doesn't come with make:model.
make:model
To see a list of all the artisan commands you have at your disposal just run php artisan.
php artisan
That being said I did just find this package which I've added to a lumen installation and it seems to work fine https://github.com/webNeat/lumen-generators#installation
Hope this helps!
2.1m questions
2.1m answers
60 comments
56.9k users