abstract class AbstractModel extends Model
Base model class, building on Eloquent.
Adds the ability for custom relations to be added to a model during runtime. These relations behave in the same way that you would expect; they can be queried, eager loaded, and accessed as an attribute.
Properties
Methods
mixed
getAttribute(string $key)
Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.
Details
at
line 67
static
boot()
{@inheritdoc}
at
line 87
__construct(array $attributes = [])
{@inheritdoc}
at
line 105
getCasts()
{@inheritdoc}
at
line 123
mixed
getAttribute(string $key)
Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.
at
line 149
protected mixed
getCustomRelation(string $name)
Get a custom relation object.
at
line 165
void
afterSave(callable $callback)
Register a callback to be run once after the model is saved.
at
line 176
void
afterDelete(callable $callback)
Register a callback to be run once after the model is deleted.
at
line 184
callable[]
releaseAfterSaveCallbacks()
at
line 196
callable[]
releaseAfterDeleteCallbacks()
at
line 208
__call($method, $arguments)
{@inheritdoc}