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.
ActionNotAllowedclass ActionNotAllowed extends Logic implements Error
The action cannot perform for an object in a the current state. Although in general it is allowed.
$user = new User();
$user->name = 'John';
$user->email = '[email protected]';
// $user->save();
$user->delete(); // Action "delete" is not allowed for user (he has not yet created)
Access by index is pointless in this context.
__construct($action, $object [, $reason [, $previous, $thrower])$action - the action name$object - the target object or its name$reason - the description of the reasongetAction():stringgetObject():string|objectgetReason():stringHow can I help you explore Laravel packages today?