Methods |
public
static
|
observe(object|array|string $classes): void
Register observers with the model.
Register observers with the model.
Throws
|
#
|
public
|
getObservableEvents(): array
Get the observable event names.
Get the observable event names.
|
#
|
public
|
setObservableEvents(array $observables): $this
Set the observable event names.
Set the observable event names.
|
#
|
public
|
addObservableEvents(array|mixed $observables): void
Add an observable event name.
Add an observable event name.
|
#
|
public
|
removeObservableEvents(array|mixed $observables): void
Remove an observable event name.
Remove an observable event name.
|
#
|
public
static
|
retrieved(QueuedClosure|Closure|string $callback): void
Register a retrieved model event with the dispatcher.
Register a retrieved model event with the dispatcher.
|
#
|
public
static
|
saving(QueuedClosure|Closure|string $callback): void
Register a saving model event with the dispatcher.
Register a saving model event with the dispatcher.
|
#
|
public
static
|
saved(QueuedClosure|Closure|string $callback): void
Register a saved model event with the dispatcher.
Register a saved model event with the dispatcher.
|
#
|
public
static
|
updating(QueuedClosure|Closure|string $callback): void
Register an updating model event with the dispatcher.
Register an updating model event with the dispatcher.
|
#
|
public
static
|
updated(QueuedClosure|Closure|string $callback): void
Register an updated model event with the dispatcher.
Register an updated model event with the dispatcher.
|
#
|
public
static
|
creating(QueuedClosure|Closure|string $callback): void
Register a creating model event with the dispatcher.
Register a creating model event with the dispatcher.
|
#
|
public
static
|
created(QueuedClosure|Closure|string $callback): void
Register a created model event with the dispatcher.
Register a created model event with the dispatcher.
|
#
|
public
static
|
replicating(QueuedClosure|Closure|string $callback): void
Register a replicating model event with the dispatcher.
Register a replicating model event with the dispatcher.
|
#
|
public
static
|
deleting(QueuedClosure|Closure|string $callback): void
Register a deleting model event with the dispatcher.
Register a deleting model event with the dispatcher.
|
#
|
public
static
|
deleted(QueuedClosure|Closure|string $callback): void
Register a deleted model event with the dispatcher.
Register a deleted model event with the dispatcher.
|
#
|
public
static
|
flushEventListeners(): void
Remove all of the event listeners for the model.
Remove all of the event listeners for the model.
|
#
|
public
static
|
getEventDispatcher(): Dispatcher
Get the event dispatcher instance.
Get the event dispatcher instance.
|
#
|
public
static
|
setEventDispatcher(Dispatcher $dispatcher): void
Set the event dispatcher instance.
Set the event dispatcher instance.
|
#
|
public
static
|
unsetEventDispatcher(): void
Unset the event dispatcher for models.
Unset the event dispatcher for models.
|
#
|
public
static
|
withoutEvents(callable $callback): mixed
Execute a callback without firing any model events for any model type.
Execute a callback without firing any model events for any model type.
|
#
|