class Notification extends ViewComponent implements Arrayable (View source)

Traits

Properties

static protected array $configurations from  Configurable
static protected array $importantConfigurations from  Configurable
protected string $evaluationIdentifier from  EvaluatesClosures
protected array $evaluationParametersToRemove from  EvaluatesClosures
protected string $view
protected array $viewData from  ViewComponent
protected string $viewIdentifier
static protected array $propertyCache from  ViewComponent
static protected array $methodCache from  ViewComponent
protected bool $isInline from  CanBeInline
protected ActionGroup|Closure $actions from  HasActions
protected string|Closure|null $body from  HasBody
protected string|Closure|null $date from  HasDate
protected int|string|Closure $duration from  HasDuration
protected string|Closure|null $icon from  HasIcon
protected string|Closure|null $iconColor from  HasIcon
protected string $id from  HasId
protected string|Closure|null $title from  HasTitle
protected array $safeViews

Methods

static 
configureUsing(Closure $callback, Closure|null $during = null, bool $isImportant = false)

No description

configure()

No description

void
setUp()

No description

evaluate($value, array $parameters = [], array $exceptParameters = [])

No description

array
resolveEvaluationParameter(string $parameter, Closure $value)

No description

bool
isEvaluationParameterRemoved(string $parameter)

No description

view(string $view, array $viewData = [])

No description

array
extractPublicProperties()

No description

array
extractPublicMethods()

No description

viewData(array $data)

No description

string
getView()

No description

string
toHtml()

No description

View
render()

No description

inline(bool $condition = true)

No description

bool
isInline()

No description

actions(ActionGroup|Closure $actions)

No description

array
getActions()

No description

body(string|Closure|null $body)

No description

from  HasBody
string|null
getBody()

No description

from  HasBody
date(string|Closure|null $date)

No description

from  HasDate
string|null
getDate()

No description

from  HasDate
duration(int|string|Closure|null $duration)

No description

int|string
getDuration()

No description

seconds(float $seconds)

No description

persistent()

No description

icon(string|Closure|null $icon)

No description

from  HasIcon
iconColor(string|Closure|null $color)

No description

from  HasIcon
string|null
getIcon()

No description

from  HasIcon
string|null
getIconColor()

No description

from  HasIcon
id(string $id)

No description

from  HasId
string
getId()

No description

from  HasId
title(string|Closure|null $title)

No description

from  HasTitle
string|null
getTitle()

No description

from  HasTitle
__construct(string $id)

No description

static Notification
make(string|null $id = null)

No description

array
getViewData()

No description

array
toArray()

No description

static Notification
fromArray(array $data)

No description

bool
isViewSafe(string $view)

No description

safeViews(string|array $safeViews)

No description

send()

No description

broadcast(Collection|array $users)

No description

sendToDatabase(Collection|array $users, bool $isEventDispatched = false)

No description

toDatabase()

No description

BroadcastMessage
getBroadcastMessage()

No description

array
getDatabaseMessage()

No description

status(string $status)

No description

success()

No description

warning()

No description

danger()

No description

static Notification
fromDatabase(DatabaseNotification $notification)

No description

static void
assertNotified(Notification|string $notification = null)

No description

Details

static configureUsing(Closure $callback, Closure|null $during = null, bool $isImportant = false)

No description

Parameters

Closure $callback
Closure|null $during
bool $isImportant

Configurable configure()

No description

Return Value

Configurable

protected void setUp()

No description

Return Value

void

evaluate($value, array $parameters = [], array $exceptParameters = [])

No description

Parameters

$value
array $parameters
array $exceptParameters

protected array getDefaultEvaluationParameters()

No description

Return Value

array

protected resolveEvaluationParameter(string $parameter, Closure $value)

No description

Parameters

string $parameter
Closure $value

protected bool isEvaluationParameterRemoved(string $parameter)

No description

Parameters

string $parameter

Return Value

bool

ViewComponent view(string $view, array $viewData = [])

No description

Parameters

string $view
array $viewData

Return Value

ViewComponent

protected array extractPublicProperties()

No description

Return Value

array

protected array extractPublicMethods()

No description

Return Value

array

ViewComponent viewData(array $data)

No description

Parameters

array $data

Return Value

ViewComponent

string getView()

No description

Return Value

string

string toHtml()

No description

Return Value

string

View render()

No description

Return Value

View

CanBeInline inline(bool $condition = true)

No description

Parameters

bool $condition

Return Value

CanBeInline

bool isInline()

No description

Return Value

bool

HasActions actions(ActionGroup|Closure $actions)

No description

Parameters

ActionGroup|Closure $actions

Return Value

HasActions

array getActions()

No description

Return Value

array

HasBody body(string|Closure|null $body)

No description

Parameters

string|Closure|null $body

Return Value

HasBody

string|null getBody()

No description

Return Value

string|null

HasDate date(string|Closure|null $date)

No description

Parameters

string|Closure|null $date

Return Value

HasDate

string|null getDate()

No description

Return Value

string|null

HasDuration duration(int|string|Closure|null $duration)

No description

Parameters

int|string|Closure|null $duration

Return Value

HasDuration

int|string getDuration()

No description

Return Value

int|string

HasDuration seconds(float $seconds)

No description

Parameters

float $seconds

Return Value

HasDuration

HasDuration persistent()

No description

Return Value

HasDuration

HasIcon icon(string|Closure|null $icon)

No description

Parameters

string|Closure|null $icon

Return Value

HasIcon

HasIcon iconColor(string|Closure|null $color)

No description

Parameters

string|Closure|null $color

Return Value

HasIcon

string|null getIcon()

No description

Return Value

string|null

string|null getIconColor()

No description

Return Value

string|null

HasId id(string $id)

No description

Parameters

string $id

Return Value

HasId

string getId()

No description

Return Value

string

HasTitle title(string|Closure|null $title)

No description

Parameters

string|Closure|null $title

Return Value

HasTitle

string|null getTitle()

No description

Return Value

string|null

__construct(string $id)

No description

Parameters

string $id

static Notification make(string|null $id = null)

No description

Parameters

string|null $id

Return Value

Notification

array getViewData()

No description

Return Value

array

array toArray()

No description

Return Value

array

static Notification fromArray(array $data)

No description

Parameters

array $data

Return Value

Notification

protected bool isViewSafe(string $view)

No description

Parameters

string $view

Return Value

bool

Notification safeViews(string|array $safeViews)

No description

Parameters

string|array $safeViews

Return Value

Notification

Notification send()

No description

Return Value

Notification

Notification broadcast(Collection|array $users)

No description

Parameters

Collection|array $users

Return Value

Notification

Notification sendToDatabase(Collection|array $users, bool $isEventDispatched = false)

No description

Parameters

Collection|array $users
bool $isEventDispatched

Return Value

Notification

BroadcastNotification toBroadcast()

No description

Return Value

BroadcastNotification

DatabaseNotification toDatabase()

No description

Return Value

DatabaseNotification

BroadcastMessage getBroadcastMessage()

No description

Return Value

BroadcastMessage

array getDatabaseMessage()

No description

Return Value

array

Notification status(string $status)

No description

Parameters

string $status

Return Value

Notification

Notification success()

No description

Return Value

Notification

Notification warning()

No description

Return Value

Notification

Notification danger()

No description

Return Value

Notification

static Notification fromDatabase(DatabaseNotification $notification)

No description

Parameters

DatabaseNotification $notification

Return Value

Notification

static void assertNotified(Notification|string $notification = null)

No description

Parameters

Notification|string $notification

Return Value

void