I've followed the instructions on the Laravel documentation for pagination with appends([])
however I'm having a little trouble with the persistence of these parameters.
Say for example, I pass home?category=Cars&make=Tesla
to my view. What is the best way to paginate with them Get requests?
Right now I've passed the category as a parameter to the view as (where category is the model i've grabbed findOrFail with the request('category');
)
$category_name = $category_model->name;
And then in my view it's like so:
But when I go between pages in the pagination, this $category_name value doesn't seem to persist. Whats the recommended way to achieve what I want?
Thanks.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire