query)) { $this->query = $this->prefix->query(); } /** @var Collection $data */ $data = $this->query->with($with)->get(); if(is_null($data)) { return null; } return $this->return == 'Model' ? $data->first() : $data; } /** * @param $uuid * @param array $with * @return Collection|Prefix|null */ public function byUuid($uuid, array $with = []): Collection|Prefix|null { $this->return = 'Model'; $this->query = $this->prefix->query()->where('uuid', $uuid); return $this->run($with); } }