Im trying to create a controller using this command: php artisan controller:make CupcakesController
but i am receiving this error:
{
"error": {
"type": "ErrorException",
"message": "include(\/opt\/lampp\/htdocs\/cupcakes-lara\/app\/controllers\/CupcakesController.php): failed to open stream: No such file or directory",
"file": "\/opt\/lampp\/htdocs\/cupcakes-lara\/vendor\/composer\/ClassLoader.php",
"line": 185
}
}
whats wrong with this?
That's generator, not artisan?
php artisan generate:controller CupcakesController
This error is generated if you create a route that points to a non-existent controller in routes.php and then try to make the controller using Artisan. Comment out the route and try again :)