class ModelInfo implements Arrayable, ArrayAccess

Methods

__construct(Model> $class, string $database, string $table, null|class-string $policy, Collection<int, array<string, mixed>> $attributes, Model>}> $relations, Collection<int, array{event: string, class: string}> $events, Collection<int, array{event: string, observer: array<int, string>}> $observers, Model>> $collection, Model>> $builder, null|JsonResource> $resource)

No description

array
toArray()

Convert the model info to an array.

bool
offsetExists(mixed $offset)

No description

mixed
offsetGet(mixed $offset)

No description

void
offsetSet(mixed $offset, mixed $value)

No description

void
offsetUnset(mixed $offset)

No description

Details

at line 32
__construct(Model> $class, string $database, string $table, null|class-string $policy, Collection<int, array<string, mixed>> $attributes, Model>}> $relations, Collection<int, array{event: string, class: string}> $events, Collection<int, array{event: string, observer: array<int, string>}> $observers, Model>> $collection, Model>> $builder, null|JsonResource> $resource)

No description

Parameters

Model> $class

the model's fully-qualified class

string $database

the database connection name

string $table

the database table name

null|class-string $policy

the policy that applies to the model

Collection<int, array<string, mixed>> $attributes

the attributes available on the model

Model>}> $relations

the relations defined on the model

Collection<int, array{event: string, class: string}> $events

the events that the model dispatches

Collection<int, array{event: string, observer: array<int, string>}> $observers

the observers registered for the model

Model>> $collection

the Collection class that collects the models

Model>> $builder

the Builder class registered for the model

null|JsonResource> $resource

the JSON resource class that represents the model

at line 64
array toArray()

Convert the model info to an array.

Return Value

array

at line 81
bool offsetExists(mixed $offset)

No description

Parameters

mixed $offset

Return Value

bool

at line 86
mixed offsetGet(mixed $offset)

No description

Parameters

mixed $offset

Return Value

mixed

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

No description

Parameters

mixed $offset
mixed $value

Return Value

void

at line 96
void offsetUnset(mixed $offset)

No description

Parameters

mixed $offset

Return Value

void