class JsonEncodingException extends RuntimeException

Methods

forModel(Model $model, string $message)

Create a new JSON encoding exception for the model.

forResource(object $resource, string $message)

Create a new JSON encoding exception for the resource.

forAttribute(Model $model, mixed $key, string $message)

Create a new JSON encoding exception for an attribute.

Details

at line 15
static JsonEncodingException forModel(Model $model, string $message)

Create a new JSON encoding exception for the model.

Parameters

Model $model
string $message

Return Value

JsonEncodingException

at line 25
static JsonEncodingException forResource(object $resource, string $message)

Create a new JSON encoding exception for the resource.

Parameters

object $resource
string $message

Return Value

JsonEncodingException

at line 35
static JsonEncodingException forAttribute(Model $model, mixed $key, string $message)

Create a new JSON encoding exception for an attribute.

Parameters

Model $model
mixed $key
string $message

Return Value

JsonEncodingException