laravel routes group with same method code example
Example 1: laravel route
Route::get('user/{id}', function ($id) {
return 'User '.$id;
});
Example 2: laravel route multiple methods
Route::match(['get', 'post'], '/user', [
'uses' => 'AppController@user',
'as' => 'useraccess',
'roles'=> 'HomeController@useroles',
]);