Rule
A notification rule.
class
Rule extends AbstractModel
Properties summary
Type | Property | Description | |
---|---|---|---|
protected | $table | ||
protected | $casts | ||
protected | $commaSeparated | ||
int | $id | The rule's unique id number. | |
string | $eventType | The type of notification rule. One of Ticket, Invoice, Order, Service, Domain, API | |
array | $events | An array of events the notification rule executes for. | |
array | $conditions | An array of conditions applied to restrict when this rule is executed | |
string | $provider | The notification provider module name | |
array | $providerConfig | An array of provider specific configuration for the rule | |
bool | $active | Is the rule active | |
bool | $canDelete | Can the rule be deleted |
Methods summary
Return Type | Method Name | Description | |
---|---|---|---|
createTable(bool|false $drop = false) | Create table schema | ||
triggerNotification(Notification $notification) | - | ||
static | rebuildCache() | Rebuild rule cache. | |
static array | getCache() | Get cached rules. | |
Builder | scopeActive(Builder $query) | The filter for the Active scope | |
static | active() | A scope to provide all active rules |
Details
createTable (bool|false $drop = false)
Create table schema
triggerNotification (Notification $notification)
static
rebuildCache ()
Rebuild rule cache.
static array
getCache ()
Get cached rules.
Builder
scopeActive (Builder $query)
The filter for the Active scope
static
active ()
A scope to provide all active rules