Which version of Laravel do you use?
--api exists since Laravel 5.6
You can run which flags has that comand
php artisan make:controlle --help
To get version of Laravel run
php artisan -v
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi guys, I am writing this command to create a controller ;
php artisan make:controller Api\Admin\ProductController --api
But it shows this error : The "--api" option does not exist Help me please..
Please or to participate in this conversation.