laravel route basics


uri-online judge

Larvel Routing

1. Basic routing :

The most basic laravel routes accept a URI and a closure providing a very simple and expressive method of defining routes.
Route::get(‘foo’,function(){
return ‘Hello World’;
});

2. Default Route Files :

All laravel files are defined in route files which is located in routes directory . The routes/web.php file is for web interface .These routes are assigned the web middleware group which provide features like session state and CSRF protection . The routes in route/api.php are stateless and are assigned in api middleware group.

The application will begin by defing routes in routes/web.php.
Route::get(‘/user’,’ userController@index’);

3.Available Router Method :

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *




Calender

October 2020
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031