6.7.1. Using Controllers to Route Requests

Instead of directing the processing of all requests from a single routing file, we can use Controller classes to group related request handlers into separate classes. Controllers are stored in the app/Http/Controllers folder.

All Laravel controllers must extend the basic class of the controller App\Http\Controllers\Controller that exists in Laravel by default. You can read more details about writing controllers at https://laravel.com/docs/5.2/controllers.