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 a stored data type that names no valid class.
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
invalidMorphClass(string $type, string $dataClass)
Create an exception for a stored data type that names no valid class.
at line 104
static CannotCastData
dataCollectionTypeRequired()
Create an exception for a missing collection item type.