In any project routing plays an important role.In Laravel 4.x we will define our routes in routes.php which is in app/Http/routes.php which is loaded by the App\Providers\RouteServiceProvider class. In Laravel 5.x the basic routes consist of a URL and a closure callback.
Example: Basic Get Route
Route::get('/', function () {
return 'Hello World';
});
Example: Basic Post Route
Route::post('/', function () {
return 'Hello World';
});
Example: Basic Put Route
Route::put('/', function () {
return 'Hello World';
});
0 Comment(s)