I am using laravel 4 routing for create friendly url for my project. I want to get url with this format: http://www.mywebsite.com/post/post-slug-content-123 . post-slug-content is my slug, and 123 is my post id. my route:
Route::get('post/{name}-{id}','postController@detail');
It not work because laravel detect "post" is my {name} variable, and "slug" is my {id} variable, but i want "post-slug-content" is {name} and 123 is {id}. Any idea ???
postController::detail()
- Nabil KadimiRoute::get('post/{name}/{id}','postController@detail');
- Adrenaxus