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.

Properties

protected array<int,string> $fillable

The attributes that are mass assignable.

protected array<string,string> $casts

The attributes that should be casted to native types.

Methods

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 43
static protected void booted()

The "booted" method of the model.

Return Value

void

at line 55
static Announcement getActive()

Get the currently active announcement.

Return Value

Announcement

at line 74
Builder scopeActive(Builder $query)

Scope a query to the active announcement.

Parameters

Builder $query

Return Value

Builder