Skip to the content.

Creating a controller

To create a controller, we use the “php artisan make:module:controller ModuleName controllerName” command.

php artisan make:module:controller blog BlogController

This will create a controller in the path modules/blog/src/Http/Controllers/BlogController.php