Digging Deeper
Suppressing Exceptions
Introduction
Basics
- Installation
- Make Model Filterable
- Filtering Models
- Allowing Filters
- Relationships
Available Filters
- Full Filter List
- Field Filters
- Relation Filters
- Morph Relation Filters
- Condition Filters
Digging Deeper
Digging Deeper
Suppressing Exceptions
Overview
Various exceptions are thrown by this package.
Many can be suppressed globally in the config file.
Suppressible
When suppressing an exception, filters that caused the exception will be ignored.
class InvalidFilterException
config("eloquent-filtering.suppress.filter.invalid");
// Filter does not have `type` key.
class MissingFilterException
config("eloquent-filtering.suppress.filter.missing");
// Can't find filter of `type` specified.
class MalformedFilterFormatException extends ValidationException
config("eloquent-filtering.suppress.filter.malformed_format");
// The filter was found, but the rest of the data does not match required format of the filter.
class DeniedFilterException
config("eloquent-filtering.suppress.filter.denied");
// Filter is not allowed.
Not Suppressible
class DuplicateFiltersException
// When you have registered a custom filter that has the same type as another filter.
class InvalidFiltersPayloadException extends InvalidArgumentException
// When filters are passed to ::filter() that are not list arrays.
class InvalidModelFqcnException extends InvalidArgumentException
// When an invalid model string is passed to `Filter::morphType()` or `Filter::morphRelation()->includeRelationFields()`.
class UnsupportedModifierException extends InvalidArgumentException
// When an invalid modifier is passed to ->withModifiers().
class RequiredFilterException extends ValidationException
// When required filter(s) were not applied.
On this page