When attempting to create an API resource controller using the --api switch, the process fails and the following error message is displayed:
The "--api" option does not exist.
Running the php artisan make:controller command _without_ the --api flag works as expected.
Run the following command (taken straight from the docs):
php artisan make:controller API/PhotoController --api
The --api option was added in Laravel 5.6.
I don't think that your Laravel version supports this feature. If you take a look at the docs for 5.5, you will not find anything about it.
Ah, thank you! I missed that.
Most helpful comment
The
--apioption was added in Laravel 5.6.