ModelException
Used when validation fails. Contains the invalid model for easy analysis.
class Winter\Storm\Database\ModelException
extends Winter\Storm\Exception\ValidationException
Extends
Class | Description |
---|---|
ValidationException
|
Validation exception class. |
Properties
protected $model : Model
The invalid model.
inherited protected $errors : Illuminate\Support\MessageBag
Inherited from
ValidationException
The message bag instance containing validation error messages
inherited protected $fields : array
Inherited from
ValidationException
Collection of invalid fields.
Methods
public __construct (Winter\Storm\Database\Model $model)
Receives the invalid model and sets the {@link model} and {@link errors} properties.
Parameters
Property | Type | Description |
---|---|---|
$model | Winter\Storm\Database\Model |
Winter\Storm\Database\Model
The troublesome model. |
Returns
mixed
public getModel () : Model
Returns the model with invalid attributes.
Returns
Model
inherited public getErrors () : Illuminate\Support\MessageBag
Inherited from
ValidationException
Returns directly the message bag instance with the model's errors.
Returns
Illuminate\Support\MessageBag
inherited public getFields ()
Inherited from
ValidationException
Returns invalid fields.
Returns
mixed
inherited protected evalErrors ()
Inherited from
ValidationException
Evaluate errors.
Returns
mixed
← Previous page
Winter\Storm\Database\ModelBehavior
Next page →
Winter\Storm\Database\ModelInterface
Copyright © 2024 Winter CMS