I copy and pasts this code from another source to my laravel project and it works well to retrieve all values of a table.
Now I would like to pass "where is_active=1" as a parameter to $this->model->getRows();
How can I do this? Below is my code:
$params = array(
'page' => $page ,
'limit' => (!is_null($request->input('rows')) ? filter_var($request->input('rows'),FILTER_VALIDATE_INT) : static::$per_page ) ,
'sort' => $sort ,
'order' => $order,
'params' => $filter,
'global' => (isset($this->access['is_global']) ? $this->access['is_global'] : 0 )
);
// Get Query
$results = $this->model->getRows( $params );
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire