The "-c" option does not exist in Laravel (artisan)

38 Views Asked by At

I am trying to create model with command

php artisan make:model -r -c ManagerModel

Getting message

PHP Symfony\Component\Console\Exception\RuntimeException: The "-r" option does not exist.

But model and controller is created.


I am trying to create model with command

php artisan make:model -c ManagerModel

Getting message

PHP Symfony\Component\Console\Exception\RuntimeException: The "-c" option does not exist.

But model and controller is still created.


I am trying to create model with command

php artisan make:model ManagerModel

Getting message

PHP Symfony\Component\Console\Exception\RuntimeException: No arguments expected for "make:model" command, got "ManagerModel".

And model is still created.


Manual says:

php artisan make:model [-a|--all] [-c|--controller] [-f|--factory] [--force] [-m|--migration] [--morph-pivot] [--policy] [-s|--seed] [-p|--pivot] [-r|--resource] [--api] [-R|--requests] [--test] [--pest] [--] <name>

I am confused. Why such errors are shown and what they mean if model (controller) created anyway?

> php -v
PHP 8.1.27 (cli) (built: Dec 21 2023 20:19:54) (NTS)
> php artisan --version
Laravel Framework 10.42.0
0

There are 0 best solutions below