protected function preloadModel() { parent::preloadModel(); if ($this->model && !$this->request->param('id')) { $this->model->order_by('name', 'asc'); //->order_by('depth', 'asc') } }
protected function preloadModel() { $this->model->where('customer_id', '=', $this->getUser()->id()); parent::preloadModel(); }