/**
* @param array $with
* @throws \Symfony\Component\Process\Exception\InvalidArgumentException
* @return \Illuminate\Database\Eloquent\Collection|static[]
* wrapper for eloquent all();
*/
public function getAll($with = [])
{
if (isset($with) && !empty($with)) {
if (!is_array($with)) {
throw new InvalidArgumentException();
}
return $this->model->with($with)->get();
}
return $this->model->all();
}