/** * Get all the contracts. * * @param array $ids * @param bool $limit * @return Collection */ public function getContract($ids, $limit) { if ($limit) { return $this->contract->whereIn('id', $ids)->paginate($limit); } return $this->contract->whereIn('id', $ids)->get(); }