vendredi 28 août 2015

Laravel 5.1 Nayjest Grids(pagination issue)

I have recently started using Laravel 5.1. Everything is working well except this extension. I have tried to use pagination, but whenever I click on pagination buttons it redirects me to a 404 page.

This is how I set up the Nayjest Grid:

$query = (new Translations)
                    ->newQuery();
$cfg = (new GridConfig())
                    ->setDataProvider(
                            new EloquentDataProvider($query)
                    )
                    ->setPageSize(5)

This is how pagination links look like: localhost/application/public/dashboard/translations/?a4beae7c03b096d9[page]=2.

Everything is ok, but when I get to this page the headers look like this:

Remote Address:[::1]:80 Request localhost/securitymatrix/public/dashboard/translations/?a4beae7c03b096d9[page]=2 Request Method:GET Status Code:301 Moved Permanently (from cache)

and I get redirected here: localhost/dashboard/translations?a4beae7c03b096d9[page]=2 where I have these headers:

Request localhost/dashboard/translations?a4beae7c03b096d9[page]=2 Request Method:GET Status Code:404 Not Found (because that url does not exist)

Hope I can find a good reason why that redirect occurs. Also if you can give me an example or explain how to rewrite the url so I can simply have ?page=x I would be gratefull.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1MZlw26
via IFTTT

Aucun commentaire:

Enregistrer un commentaire