1

I've tried this artisan command as I followed a tutorial

php artisan make:model Foo -m

but I get this error:

exception 'RuntimeException' with message 'The "-m" option does not exist.' 

why It's not recognizing that?
If It's a wrong way to do It , what the right one?

1 Answer 1

1

In short, this is how you do it.

C:\xampp\htdocs\lms>php artisan make:model Test -m
Model created successfully.
Created Migration: 2016_08_29_160434_create_tests_table

It must work. If that does not, do.
C:\xampp\htdocs\lms>composer install. 
and that should work.
Sign up to request clarification or add additional context in comments.

3 Comments

so It doesn't depend on laravel's version?
I mean you are doing the right thing if you are on 5.2. Did you copy/clone an old instance of Laravel? If yes, do composer install or composer update and it should fix it. It does depend on the version, yes.
Glad to hear that. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.