Reputation: 716
I want to custom Laravel 4.2 pagination to something like this :
Old:
www.domain.com/lorem-ipsum?page=2
New:
www.domain.com/lorem-ipsum-page2
It is possible to do that?
Upvotes: 1
Views: 72
Reputation: 1468
Yes, you have to specify it on your route definition:
Old:
Route::get('lorem-ipsum', function() {
$page = Input::get['page'];
});
To:
Route::get('lorem-ipsum-page{page}', function($page) {
// now page is as a parameter of this function, it is not necessary to get it from Input
});
Upvotes: 1