axy/errors
axy/errors is a PHP 8.1+ helper for defining and organizing exception classes. Provides common exception structures, basic error classes, default messages, backtrace truncation, and global options to standardize error handling across projects.
NotValidclass NotValid extends Logic implements InvalidValue
The value does not fit the requirements.
$value = 'This is value';
$validators = [
'IsString',
'NotEmpty',
['MaxLength', 5],
];
validation($value, $validators); // Value of $value is not valid: too long'
__construct([$varName, $errorMessage [, $previous, $thrower])$varName - the value name (the name of the variable or the container)$errorMessage - the description of the errorgetVarName():stringgetErrorMessage():stringHow can I help you explore Laravel packages today?