create function in routes laravle code example
Example 1: routing in laravel
Route::view('/welcome', 'welcome');
Route::view('/welcome', 'welcome', ['name' => 'Taylor']);
Example 2: how to create route in laravel
Route::match(['get', 'post'], '/', function () {
//
});