Lumen (Laravel) Eloquent php artisan make:model not defined
![Multi tool use Multi tool use](http://sgv.ssvwv.com/sg/ssvwvcomimagb.png)
Multi tool use
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 ?
Add details
php artisan --version
Displays :
Laravel Framework version Lumen (5.1.6) (Laravel Components 5.1.*)
php laravel-5.1 lumen
add a comment |
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 ?
Add details
php artisan --version
Displays :
Laravel Framework version Lumen (5.1.6) (Laravel Components 5.1.*)
php laravel-5.1 lumen
add a comment |
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 ?
Add details
php artisan --version
Displays :
Laravel Framework version Lumen (5.1.6) (Laravel Components 5.1.*)
php laravel-5.1 lumen
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 ?
Add details
php artisan --version
Displays :
Laravel Framework version Lumen (5.1.6) (Laravel Components 5.1.*)
php laravel-5.1 lumen
php laravel-5.1 lumen
edited Dec 17 '15 at 16:55
jedema
asked Dec 17 '15 at 16:24
![](https://i.stack.imgur.com/udGqo.png?s=32&g=1)
![](https://i.stack.imgur.com/udGqo.png?s=32&g=1)
jedemajedema
5,14763562
5,14763562
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You're seeing this error because Lumen doesn't come with make:model
.
To see a list of all the artisan commands you have at your disposal just run 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!
add a comment |
Go to the project directory and add the generators package to your composer.json using the following command:
composer require wn/lumen-generators
Add following code segment to the
app/Providers/AppServiceProvider.php
:
public function register()
{
if ($this->app->environment() == 'local') {
$this->app->register('WnGeneratorsCommandsServiceProvider');
}
}
Make sure that you have un-commented the following line in
bootstarp/app.php
to allow service providers on your project:
$app->register(AppProvidersAppServiceProvider::class);
Run
php artisan list
on the project directory (document root) now you will see new items there.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f34339517%2flumen-laravel-eloquent-php-artisan-makemodel-not-defined%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You're seeing this error because Lumen doesn't come with make:model
.
To see a list of all the artisan commands you have at your disposal just run 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!
add a comment |
You're seeing this error because Lumen doesn't come with make:model
.
To see a list of all the artisan commands you have at your disposal just run 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!
add a comment |
You're seeing this error because Lumen doesn't come with make:model
.
To see a list of all the artisan commands you have at your disposal just run 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!
You're seeing this error because Lumen doesn't come with make:model
.
To see a list of all the artisan commands you have at your disposal just run 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!
answered Dec 17 '15 at 17:18
Ross WilsonRoss Wilson
17k22842
17k22842
add a comment |
add a comment |
Go to the project directory and add the generators package to your composer.json using the following command:
composer require wn/lumen-generators
Add following code segment to the
app/Providers/AppServiceProvider.php
:
public function register()
{
if ($this->app->environment() == 'local') {
$this->app->register('WnGeneratorsCommandsServiceProvider');
}
}
Make sure that you have un-commented the following line in
bootstarp/app.php
to allow service providers on your project:
$app->register(AppProvidersAppServiceProvider::class);
Run
php artisan list
on the project directory (document root) now you will see new items there.
add a comment |
Go to the project directory and add the generators package to your composer.json using the following command:
composer require wn/lumen-generators
Add following code segment to the
app/Providers/AppServiceProvider.php
:
public function register()
{
if ($this->app->environment() == 'local') {
$this->app->register('WnGeneratorsCommandsServiceProvider');
}
}
Make sure that you have un-commented the following line in
bootstarp/app.php
to allow service providers on your project:
$app->register(AppProvidersAppServiceProvider::class);
Run
php artisan list
on the project directory (document root) now you will see new items there.
add a comment |
Go to the project directory and add the generators package to your composer.json using the following command:
composer require wn/lumen-generators
Add following code segment to the
app/Providers/AppServiceProvider.php
:
public function register()
{
if ($this->app->environment() == 'local') {
$this->app->register('WnGeneratorsCommandsServiceProvider');
}
}
Make sure that you have un-commented the following line in
bootstarp/app.php
to allow service providers on your project:
$app->register(AppProvidersAppServiceProvider::class);
Run
php artisan list
on the project directory (document root) now you will see new items there.
Go to the project directory and add the generators package to your composer.json using the following command:
composer require wn/lumen-generators
Add following code segment to the
app/Providers/AppServiceProvider.php
:
public function register()
{
if ($this->app->environment() == 'local') {
$this->app->register('WnGeneratorsCommandsServiceProvider');
}
}
Make sure that you have un-commented the following line in
bootstarp/app.php
to allow service providers on your project:
$app->register(AppProvidersAppServiceProvider::class);
Run
php artisan list
on the project directory (document root) now you will see new items there.
edited Jan 2 at 15:36
DaveyDaveDave
3,77783758
3,77783758
answered Jan 31 '18 at 18:21
![](https://i.stack.imgur.com/2CLUc.jpg?s=32&g=1)
![](https://i.stack.imgur.com/2CLUc.jpg?s=32&g=1)
ThushanThushan
645710
645710
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f34339517%2flumen-laravel-eloquent-php-artisan-makemodel-not-defined%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Njh5hwjVw m BFz2zoJ65s,7BHcIiR4 UXPgsM WAHVtzM1n2td3