Placeholder Types
Specify the type of data to be expected in the Placeholder
Router::add_route("GET", '/echo/{name:string}', [Controller::class, 'index']);Integers
Router::add_route('GET', '/echo/{id:int}', [Controller::class, 'index']);Strings
Router::add_route("GET", '/echo/{name:string}', [Controller::class, 'index']);Path
Router::add_route('GET', '/echo/{way:path}', [Cont::class, 'index']);Last updated