Home > Net >  Artisan: Make Model not found
Artisan: Make Model not found

Time:10-25

Right now I'm following a tutorial, where it led me to install Laravel Artisan extension in VS Code. It went to the point where I need to open a command palette and write Artisan Make: Model to create a model.

After I tried that, it shows an error message along with command 'artisan.make.model' not found

So umm, anybody know why this happen? Or any other way I can bypass this problem?

Thank you in advance!

CodePudding user response:

For using Laravel Artisan extension:

Install the Laravel Artisan Extension (Author: Ryan Naddy)

Make Sure you're in project work directory.

Then, Open command palette by shortcut Ctrl Shift p

There Search Artisan: Make Model and Follow instructions like next prompt will ask you for model name where you have to provide Name of your model and whether you want a controller/migration or not.

Same can be done by Php artisan make:model ModelName -mc just by opening command prompt or terminal so whichever way it suits you.

Note: I've tested this on ubuntu so let me know if you want more help.

CodePudding user response:

May we know the exact text you typed in the 'command palette'?

It is usually written this way:

php artisan make:model [model_name]

For example:

php artisan make:model Flight

  • Related