PHP Artisan Make:Model Command Does Not Work

Asked

Viewed 1,032 times

0

I’m using Composer to generate my PHP files and other things. I think it makes programming much easier.

For example, to generate a Controller I do so:

php artisan controller:make NomeController

Works!

But when typing:

php artisan make:model NomeModel

It does not work and presents this error:

There are no Commands defined in the "make" namespace.

I searched, but found nothing. And I realized that just typing php artisan - in which it displays a list of existing commands - the model really doesn’t exist.

What to do ?

1 answer

2


Would not be:

php artisan model:make NomeModel 

You can also use the command:

php artisan 

To list all commands.

If you don’t have it you can use the extension Laravel 4 Generators that meets your needs.

Adding some new features to your Article:

generate:model
generate:view
generate:controller
generate:seed
generate:migration
generate:pivot
generate:resource
generate:scaffold
  • I did it this way too and it didn’t work. So I did this listing and there’s nothing with Model.

  • @Diegosouza I made an edition that can help you

  • It worked very well this library. When creating the Model, it puts a / before the word Eloquent. It is normal that ?

  • normal yes no problem

  • All right, then. Thank you, Bro.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.