getByCollectionName() публичный Метод

* Get all media for the given type and collection name.
public getByCollectionName ( string $collectionName ) : Illuminate\Database\Eloquent\Collection
$collectionName string
Результат Illuminate\Database\Eloquent\Collection
Пример #1
0
 public function getMediaItems() : Collection
 {
     $modelType = $this->argument('modelType');
     $collectionName = $this->argument('collectionName');
     if (!is_null($modelType) && !is_null($collectionName)) {
         return $this->mediaRepository->getByModelTypeAndCollectionName($modelType, $collectionName);
     }
     if (!is_null($modelType)) {
         return $this->mediaRepository->getByModelType($modelType);
     }
     if (!is_null($collectionName)) {
         return $this->mediaRepository->getByCollectionName($collectionName);
     }
     return $this->mediaRepository->all();
 }