Level 28
Anyone have any ideas?
I have a small function that gets my inventory items, and paginates them.
public function getInventoryStatus(Request $request, $type = 'boat')
{
$filters = $this->cleanFilters($request->all());
$filters['type'] = $type;
$dealer = (array_key_exists('dealerid', $filters)) ? null : array(3,45);
$inventory = InventoryItem::with('status')->filterInventory($filters, $dealer)->paginate(25);
return view('inventory.inventory-status', array('models' => $this->models, 'inventory' => $inventory, 'dealers' => $this->dealers));
}
The problem is I get an error when clicking on the pagination numbers:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'page' in 'where clause' (SQL: select count(*) as aggregate from `lb_inventory_items` where (`page` = 2 and `type` = boat) and `dealerid` in (3, 45))
If anyone knows why this is happening, It would greatly appreciate any help.
Please or to participate in this conversation.