laravel create route in controller code example
Example 1: laravel route controller
use App\Http\Controllers\UserController;
Route::get('user/{id}', [UserController::class, 'show']);
Example 2: how to create route in laravel
Route::match(['get', 'post'], '/', function () {
//
});