paginate(20); } public function getWarehouseById($WarehouseId) { return Warehouse::findOrFail($WarehouseId); } public function getWarehouseByEmail($email) { return Warehouse::where('email', $email)->first(); } public function delete($WarehouseId) { Warehouse::destroy($WarehouseId); } public function create($WarehouseDetails) { return Warehouse::create($WarehouseDetails); } public function update($WarehouseId, array $newDetails) { return Warehouse::whereId($WarehouseId)->update($newDetails); } public function pluck() { return Warehouse::pluck('title', 'id'); } }