Crud: Pagination Problem

Created on 14 Oct 2016  路  1Comment  路  Source: Laravel-Backpack/CRUD

I Have 30,000 record in my table and create crud for this table but when laod this data i get error after minute
screen shot 1395-07-23 at 20 12 50

i check setModel Method in CrudPannel and select (*)

 public function setModel($model_namespace)
    {
        if (! class_exists($model_namespace)) {
            throw new \Exception('This model does not exist.', 404);
        }

        $this->model = new $model_namespace();
        $this->query = $this->model->select('*');
    }

i think its load all data then shown in table rather than select 10 last item and then select page 2
how can i fix this problem ?

Most helpful comment

Have you enabled AJAX ?

You have to add $this->crud->enableAjaxTable(); in your index() method. AJAX loading is not enabled by default.

You can read more here.

>All comments

Have you enabled AJAX ?

You have to add $this->crud->enableAjaxTable(); in your index() method. AJAX loading is not enabled by default.

You can read more here.

Was this page helpful?
0 / 5 - 0 ratings