Example:
/this/are/parts/and/{any}/is/a/segment
To request the {any} i need to use segment(1) right>?
Wait? Don't you just pass the parameter through the method?
Route::get('url/{id}', SomeController@getIndex);
getIndex($id) {
echo $id;
}
Not sure if that's is answering your question or not. Let me know if it's something different and I would be glad to help!
EDIT: so just to explain a little more. When you access url/5 you will get an echo of 5.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community