I'm using Laravel 5.5 with PHP 7.0.
I am trying to create pagination following the docs.
However with some queries which have multiple values, rendered links has different keys.
Simplest reproducing code is:
>>> User::query()->paginate(30)->appends(['a' => ['foo', 'bar', 'baz']])->nextPageUrl()
=> "http://ift.tt/2jntBqr"
# expecting "http://ift.tt/2hv4eT6"
In other words, the next url of /user?page=1&id[]=1&id[]=2 should be:
/user?page=2&id[]=1&id[]=2
but actually
/user?page=2&id[0]=1&id[1]=2
What is wrong in my code?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2hr8PCk
via IFTTT
Aucun commentaire:
Enregistrer un commentaire