class ModelInfo implements Arrayable, ArrayAccess (View source)

internal  
 

Methods

__construct(TModel> $class, string $database, string $table, class-string|null $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, TModel>> $collection, TModel>> $builder, JsonResource|null $resource)

No description

TReturn
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

__construct(TModel> $class, string $database, string $table, class-string|null $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, TModel>> $collection, TModel>> $builder, JsonResource|null $resource)

No description

Parameters

TModel> $class

The model's fully-qualified class.

string $database

The database connection name.

string $table

The database table name.

class-string|null $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.

TModel>> $collection

The Collection class that collects the models.

TModel>> $builder

The Builder class registered for the model.

JsonResource|null $resource

The JSON resource that represents the model.

TReturn toArray()

Convert the model info to an array.

Return Value

TReturn

bool offsetExists(mixed $offset)

Determine if the given offset exists.

Parameters

mixed $offset

Return Value

bool

mixed offsetGet(mixed $offset)

Get the value for a given offset.

Parameters

mixed $offset

Return Value

mixed

Exceptions

InvalidArgumentException

void offsetSet(mixed $offset, mixed $value)

Set the value at the given offset.

Parameters

mixed $offset
mixed $value

Return Value

void

Exceptions

LogicException

void offsetUnset(mixed $offset)

Unset the value at the given offset.

Parameters

mixed $offset

Return Value

void

Exceptions

LogicException

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.