Okipa/laravel-medialibrary-ext

Trigger exception when collection is not found

Okipa opened this issue · 1 comments

Okipa commented

ToDo

  • When calling one of the package public methods (described in the readme) with an non-existent collection name, throw an Okipa\MediaLibraryExt\Exceptions\CollectionNotFound exception with the caption The collection "<collectionName>" has not been found in the <modelNamespace> model. to warn the user that the collection doesn't exist in the targeted model.
  • Add unit tests for each feature provided by the package that are verifying that exception are thrown.
  • Add an explanation in the README file, noticing that an exception will be thrown when the specified collection is not found in the targeted model, in order to avoid careless mistakes.
Okipa commented

Fixed in #27