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
<p>Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.</p>
<p>Register a callback to be run once after the model is saved.</p>
<p>Register a callback to be run once after the model is deleted.</p>
Details
at
line 65
static
boot()
<p>{@inheritdoc}</p>
at
line 85
__construct(array $attributes = [])
<p>{@inheritdoc}</p>
at
line 105
array
getDates()
<p>Get the attributes that should be converted to dates.</p>
at
line 123
mixed
getAttribute(string $key)
<p>Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.</p>
at
line 149
protected mixed
getCustomRelation(string $name)
<p>Get a custom relation object.</p>
at
line 165
void
afterSave(callable $callback)
<p>Register a callback to be run once after the model is saved.</p>
at
line 176
void
afterDelete(callable $callback)
<p>Register a callback to be run once after the model is deleted.</p>
at
line 184
callable[]
releaseAfterSaveCallbacks()
at
line 196
callable[]
releaseAfterDeleteCallbacks()
at
line 208
__call($method, $arguments)
<p>{@inheritdoc}</p>