Hi
Pagination is independent of routing design, sample of laravel pagination:
My routes of blog:
https://github.com/fluzo/blog/blob/master/src/routes.php
Suggestion:
/categories/category_id or category_slug -> List of post of this category.
/categories/category_id or category_slug/post_id or post_slug or post_slug-id -> View post.
best:
/category_slug -> List of post of this category.
/category_slug/post_slug-id -> View post.
Thank your for your reply Fluzo. But I want also to get posts date by date basis. What is your suggestion for that?
--
I guess you can do this :
Route::get('{category_slug}/{date}/{post_slug}', 'BlogController@show');
And access the values in your method, like :
public function show($category_slug, $date, $post_slug) {...}
Also, keeping date like 18052014 looks more of an id, try category/18-05-2014/lorem-ipsum-do-sit-amet
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community