class ModelInfo implements Arrayable, ArrayAccess

internal  
 

Methods

__construct(string $class, string|null $database, string $table, string|null $policy, Collection $attributes, Collection $relations, Collection $events, Collection $observers, string $collection, string $builder, string|null $resource)

Create a new model info instance.

array
toArray()

Convert the model info to an array.

bool
offsetExists(mixed $offset)

Determine if the given offset exists.

mixed
offsetGet(mixed $offset)

Get the value for a given offset.

void
offsetSet(mixed $offset, mixed $value)

Set the value at the given offset.

void
offsetUnset(mixed $offset)

Unset the value at the given offset.

Details

at line 38
__construct(string $class, string|null $database, string $table, string|null $policy, Collection $attributes, Collection $relations, Collection $events, Collection $observers, string $collection, string $builder, string|null $resource)

Create a new model info instance.

Parameters

string $class

the model's fully-qualified class

string|null $database

the database connection name

string $table

the database table name

string|null $policy

the policy that applies to the model

Collection $attributes

the attributes available on the model

Collection $relations

the relations defined on the model

Collection $events

the events that the model dispatches

Collection $observers

the observers registered for the model

string $collection

the Collection class that collects the models

string $builder

the Builder class registered for the model

string|null $resource

the JSON resource class that represents the model

at line 70
array toArray()

Convert the model info to an array.

Return Value

array

at line 90
bool offsetExists(mixed $offset)

Determine if the given offset exists.

Parameters

mixed $offset

Return Value

bool

at line 100
mixed offsetGet(mixed $offset)

Get the value for a given offset.

Parameters

mixed $offset

Return Value

mixed

Exceptions

InvalidArgumentException

at line 110
void offsetSet(mixed $offset, mixed $value)

Set the value at the given offset.

Parameters

mixed $offset
mixed $value

Return Value

void

Exceptions

LogicException

at line 120
void offsetUnset(mixed $offset)

Unset the value at the given offset.

Parameters

mixed $offset

Return Value

void

Exceptions

LogicException