SEO friendly URL

Submitted by haruncpi - 4 years ago

Here I've given the rules for making SEO friendly URL for laravel website.

// do this for readability and more SEO friendly URL

example.com/posts
Route::get('/posts','SiteController@posts');

example.com/posts/post-title
Route::get('/posts/{slug}','SiteController@postDetails');

example.com/categories/laravel-tutorial
Route::get('/categories/{slug}','SiteController@categoryPosts');

// don't do this
example.com/posts?id=23
example.com/cat?id=23


Read more: https://bit.ly/laravel-seo-friendly-url