Then we can get benefit of protected
Code:
protected $table = 'items';
protected $primaryKey = 'item_id';
protected $allowedFields = ['field1', 'field2', 'field3'];
Then:
PHP Code:
public function get_all_items()
{
return $this->findAll();
}
public function fetch_single_item($item_id)
{
return $this->where('item_id', $item_id)
->first();
}
Is this what you are looking for?