Lumen (Laravel) Eloquent php artisan make:model not defined

Multi tool use
Multi tool use












20















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.*)









share|improve this question





























    20















    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.*)









    share|improve this question



























      20












      20








      20


      4






      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.*)









      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 17 '15 at 16:55







      jedema

















      asked Dec 17 '15 at 16:24









      jedemajedema

      5,14763562




      5,14763562
























          2 Answers
          2






          active

          oldest

          votes


















          23














          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!






          share|improve this answer































            4
















            1. Go to the project directory and add the generators package to your composer.json using the following command:



              composer require wn/lumen-generators



            2. Add following code segment to the app/Providers/AppServiceProvider.php:



              public function register()
              {
              if ($this->app->environment() == 'local') {
              $this->app->register('WnGeneratorsCommandsServiceProvider');
              }
              }



            3. 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);


            4. Run php artisan list on the project directory (document root) now you will see new items there.







            share|improve this answer

























              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
              });


              }
              });














              draft saved

              draft discarded


















              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









              23














              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!






              share|improve this answer




























                23














                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!






                share|improve this answer


























                  23












                  23








                  23







                  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!






                  share|improve this answer













                  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!







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 17 '15 at 17:18









                  Ross WilsonRoss Wilson

                  17k22842




                  17k22842

























                      4
















                      1. Go to the project directory and add the generators package to your composer.json using the following command:



                        composer require wn/lumen-generators



                      2. Add following code segment to the app/Providers/AppServiceProvider.php:



                        public function register()
                        {
                        if ($this->app->environment() == 'local') {
                        $this->app->register('WnGeneratorsCommandsServiceProvider');
                        }
                        }



                      3. 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);


                      4. Run php artisan list on the project directory (document root) now you will see new items there.







                      share|improve this answer






























                        4
















                        1. Go to the project directory and add the generators package to your composer.json using the following command:



                          composer require wn/lumen-generators



                        2. Add following code segment to the app/Providers/AppServiceProvider.php:



                          public function register()
                          {
                          if ($this->app->environment() == 'local') {
                          $this->app->register('WnGeneratorsCommandsServiceProvider');
                          }
                          }



                        3. 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);


                        4. Run php artisan list on the project directory (document root) now you will see new items there.







                        share|improve this answer




























                          4












                          4








                          4









                          1. Go to the project directory and add the generators package to your composer.json using the following command:



                            composer require wn/lumen-generators



                          2. Add following code segment to the app/Providers/AppServiceProvider.php:



                            public function register()
                            {
                            if ($this->app->environment() == 'local') {
                            $this->app->register('WnGeneratorsCommandsServiceProvider');
                            }
                            }



                          3. 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);


                          4. Run php artisan list on the project directory (document root) now you will see new items there.







                          share|improve this answer

















                          1. Go to the project directory and add the generators package to your composer.json using the following command:



                            composer require wn/lumen-generators



                          2. Add following code segment to the app/Providers/AppServiceProvider.php:



                            public function register()
                            {
                            if ($this->app->environment() == 'local') {
                            $this->app->register('WnGeneratorsCommandsServiceProvider');
                            }
                            }



                          3. 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);


                          4. Run php artisan list on the project directory (document root) now you will see new items there.








                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Jan 2 at 15:36









                          DaveyDaveDave

                          3,77783758




                          3,77783758










                          answered Jan 31 '18 at 18:21









                          ThushanThushan

                          645710




                          645710






























                              draft saved

                              draft discarded




















































                              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.




                              draft saved


                              draft discarded














                              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





















































                              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
                              IcojrI eou,yZT8Ae kiAXCTs0cBevqxPmg25WeZA4ab,NROzLU,6jUR

                              Popular posts from this blog

                              Monofisismo

                              Angular Downloading a file using contenturl with Basic Authentication

                              Olmecas