class Announcement extends Model

Announcements are broadcasts from the application administrators that should reach all users of the instance.

Traits

HasFactory

Constants

CACHE_KEY

Key to use to cache the active announcement.

Methods

array
casts()

Get the attributes that should be cast.

static void
booted()

The "booted" method of the model.

static Announcement
getActive()

Get the currently active announcement.

Builder
scopeActive(Builder $query)

Scope a query to the active announcement.

Details

at line 29
protected array casts()

Get the attributes that should be cast.

Return Value

array

at line 41
static protected void booted()

The "booted" method of the model.

Return Value

void

at line 57
static Announcement getActive()

Get the currently active announcement.

Return Value

Announcement

at line 82
Builder scopeActive(Builder $query)

Scope a query to the active announcement.

Parameters

Builder $query

Return Value

Builder