Route Files

Route Files

Located in the routes directory.

Are automatically loaded by the framework.


Defines routes that are for your web interface.

Route::get('/user', 'UserController@index');

For most applications, you will begin by defining routes in your routes/web.php file.

The routes defined in routes/web.php may be accessed by entering the defined route's URL in your browser.


The routes in routes/api.php are stateless and are assigned the api middleware group.

Routes defined in the routes/api.php file are nested within a route group by the RouteServiceProvider.

Route Files — Structure map

Clickable & Draggable!

Route Files — Related pages: