Home >> Laravel 6.X >> What is Routing in Laravel 6.X

What is Routing in Laravel 6.X

Laravel Routing provide all requests are linked with the routes.

The routes/web.php file defines routes that are for your web pages.

These routes are assigned the web middleware group, which provides features like session state and CSRF protection. 

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

Router Methods

1)-get

2)-post

3)-put

4)-patch

5)-delete

6)-options

Redirect Routes

Redirect Routes used for a route that redirects from one URI to another URI.
you can use the Route::redirect method. 

Route::redirect('/fromurl', '/tourl');

View Routes

View Routes used to return a view. 
you may use the Route::view method.

Route::view('/welcome', 'welcome');

Post Your Comment

Next Questions
What is Middleware

Copyright ©2022 coderraj.com. All Rights Reserved.