Aug 15, 2017
4
Level 1
SEO friendly URL - routes
Hello guys,
what is the best way to implement SEO friendly urls? For example I have an article detail which looks like this: http://localhost:8888/project/public/detail/1 or http://localhost:8888/project/public/detail/2
So my route looks like this:
Route::get('detail/{id}', 'SiteController@article');
Now I know this does not look really good, so naturally I would like to have the urls more like:
http://localhost:8888/project/public/detail/title-of-the-article
But not sure about what is correct way of doing that? I am thinking I somehow need to use a slug which will somehow automatically replaced those "ids" with " articles titles"?
Thank you
Please or to participate in this conversation.