CannotCastData
class CannotCastData extends Exception
Methods
Create an exception for a non-array cast value.
Create an exception for a non-data cast value.
Create an exception for a non-transformable data cast value.
Create an exception for a non-transformable Eloquent data class.
Create an exception for a data value of the wrong class.
Create an exception for an invalid stored data representation.
Create an exception for an invalid stored collection item.
Create an exception for an invalid abstract data envelope.
Create an exception for an unknown data morph alias.
Create an exception for an invalid data morph class.
Create an exception for a data class without an enforced morph alias.
Create an exception for a missing collection item type.
Details
at line 14
static CannotCastData
shouldBeArray(string $modelClass, string $attribute)
Create an exception for a non-array cast value.
at line 22
static CannotCastData
shouldBeData(string $modelClass, string $attribute)
Create an exception for a non-data cast value.
at line 30
static CannotCastData
shouldBeTransformableData(string $modelClass, string $attribute)
Create an exception for a non-transformable data cast value.
at line 38
static CannotCastData
dataClassMustBeTransformable(string $dataClass)
Create an exception for a non-transformable Eloquent data class.
at line 48
static CannotCastData
shouldBeDataClass(string $modelClass, string $attribute, string $dataClass)
Create an exception for a data value of the wrong class.
at line 61
static CannotCastData
invalidStoredValue(string $modelClass, string $attribute)
Create an exception for an invalid stored data representation.
at line 71
static CannotCastData
invalidStoredCollectionItem(string $modelClass, string $attribute, int|string $itemKey)
Create an exception for an invalid stored collection item.
at line 84
static CannotCastData
invalidMorphEnvelope(string $modelClass, string $attribute)
Create an exception for an invalid abstract data envelope.
at line 94
static CannotCastData
unknownMorphAlias(string $alias, string $dataClass)
Create an exception for an unknown data morph alias.
at line 102
static CannotCastData
invalidMorphClass(string $class, string $dataClass)
Create an exception for an invalid data morph class.
at line 112
static CannotCastData
morphAliasRequired(string $class)
Create an exception for a data class without an enforced morph alias.
at line 120
static CannotCastData
dataCollectionTypeRequired()
Create an exception for a missing collection item type.