public function getByCollectionName(string $collectionName) : DbCollection { return $this->model->where('collection_name', $collectionName)->get(); }
/** * Get all media for the given type. * * @param string $modelType * * @return \Illuminate\Database\Eloquent\Collection */ public function getByModelType($modelType) { return $this->model->where('model_type', $modelType)->get(); }