public function getByModelType(string $modelType) : DbCollection { return $this->model->where('model_type', $modelType)->get(); }
public function getMediaToBeRegenerated() { if ($this->argument('modelType') == '') { return $this->mediaRepository->all(); } return $this->mediaRepository->getByModelType($this->argument('modelType')); }