class Notification extends ViewComponent implements Arrayable (View source)

Traits

Properties

protected string $evaluationIdentifier from  EvaluatesClosures
static protected Closure>> $macros from  Macroable
protected string $view
protected string|Closure|null $defaultView from  ViewComponent
protected array<string,mixed> $viewData from  ViewComponent
protected string $viewIdentifier
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 Htmlable|Closure|null $icon from  HasIcon
protected IconPosition|string|Closure|null $iconPosition from  HasIcon
protected IconSize|string|Closure|null $iconSize from  HasIcon
protected string $iconColor from  HasIconColor
protected string $id from  HasId
protected string|Closure|null $status from  HasStatus
protected string|Closure|null $title from  HasTitle
protected string $color from  HasColor
protected string $defaultColor from  HasColor
protected string[] $safeViews

Methods

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

No description

configure()

No description

void
setUp()

No description

mixed
evaluate(mixed $value, array $namedInjections = [], array $typedInjections = [])

No description

mixed
resolveClosureDependencyForEvaluation(ReflectionParameter $parameter, array $namedInjections, array $typedInjections)

No description

array
resolveDefaultClosureDependencyForEvaluationByName(string $parameterName)

No description

array
resolveDefaultClosureDependencyForEvaluationByType(string $parameterType)

No description

string|null
static void
macro(string $name, callable $macro)

No description

static void
mixin(object $mixin, bool $replace = true)

No description

static void
flushMacros()

No description

static mixed
__callStatic(string $method, array $parameters)

No description

mixed
__call(string $method, array $parameters)

No description

static callable|null
getMacro(string $method)

No description

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

No description

defaultView(string|Closure|null $view)

No description

array
extractPublicMethods()

No description

viewData(array $data)

No description

string
getView()

No description

string|null
getDefaultView()

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(Htmlable|Closure|null $icon)

No description

from  HasIcon
iconPosition(IconPosition|string|Closure|null $position)

No description

from  HasIcon
iconSize(IconSize|string|Closure|null $size)

No description

from  HasIcon
Htmlable|null
getIcon()

No description

from  HasIcon
IconPosition|string
getIconPosition()

No description

from  HasIcon
IconSize|string|null
getIconSize()

No description

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

No description

string|array|null
getIconColor()

No description

id(string $id)

No description

from  HasId
string
getId()

No description

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

No description

string|null
getStatus()

No description

danger()

No description

info()

No description

success()

No description

warning()

No description

title(string|Closure|null $title)

No description

from  HasTitle
string|null
getTitle()

No description

from  HasTitle
color(string|array|Closure|null $color)

No description

from  HasColor
defaultColor(string|array|Closure|null $color)

No description

from  HasColor
string|array|null
getColor()

No description

from  HasColor
__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

static Notification
fromDatabase(DatabaseNotification $notification)

No description

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

No description

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

No description

Details

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

No description

Parameters

Closure $modifyUsing
Closure|null $during
bool $isImportant

Return Value

mixed

Configurable configure()

No description

Return Value

Configurable

protected void setUp()

No description

Return Value

void

mixed evaluate(mixed $value, array $namedInjections = [], array $typedInjections = [])

No description

Parameters

mixed $value
array $namedInjections
array $typedInjections

Return Value

mixed

protected mixed resolveClosureDependencyForEvaluation(ReflectionParameter $parameter, array $namedInjections, array $typedInjections)

No description

Parameters

ReflectionParameter $parameter
array $namedInjections
array $typedInjections

Return Value

mixed

protected array resolveDefaultClosureDependencyForEvaluationByName(string $parameterName)

No description

Parameters

string $parameterName

Return Value

array

protected array resolveDefaultClosureDependencyForEvaluationByType(string $parameterType)

No description

Parameters

string $parameterType

Return Value

array

protected string|null getTypedReflectionParameterClassName(ReflectionParameter $parameter)

No description

Parameters

ReflectionParameter $parameter

Return Value

string|null

static void macro(string $name, callable $macro)

No description

Parameters

string $name
callable $macro

Return Value

void

static void mixin(object $mixin, bool $replace = true)

No description

Parameters

object $mixin
bool $replace

Return Value

void

static void flushMacros()

No description

Return Value

void

static mixed __callStatic(string $method, array $parameters)

No description

Parameters

string $method
array $parameters

Return Value

mixed

mixed __call(string $method, array $parameters)

No description

Parameters

string $method
array $parameters

Return Value

mixed

static protected callable|null getMacro(string $method)

No description

Parameters

string $method

Return Value

callable|null

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

No description

Parameters

string|null $view
array $viewData

Return Value

ViewComponent

ViewComponent defaultView(string|Closure|null $view)

No description

Parameters

string|Closure|null $view

Return Value

ViewComponent

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|null getDefaultView()

No description

Return Value

string|null

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(Htmlable|Closure|null $icon)

No description

Parameters

Htmlable|Closure|null $icon

Return Value

HasIcon

HasIcon iconPosition(IconPosition|string|Closure|null $position)

No description

Parameters

IconPosition|string|Closure|null $position

Return Value

HasIcon

HasIcon iconSize(IconSize|string|Closure|null $size)

No description

Parameters

IconSize|string|Closure|null $size

Return Value

HasIcon

Htmlable|null getIcon()

No description

Return Value

Htmlable|null

IconPosition|string getIconPosition()

No description

Return Value

IconPosition|string

IconSize|string|null getIconSize()

No description

Return Value

IconSize|string|null

HasIconColor iconColor(string|array|Closure|null $color)

No description

Parameters

string|array|Closure|null $color

Return Value

HasIconColor

string|array|null getIconColor()

No description

Return Value

string|array|null

| array{50: string, 100: string, 200: string, 300: string, 400: string, 500: string, 600: string, 700: string, 800: string, 900: string, 950: string} | null

HasId id(string $id)

No description

Parameters

string $id

Return Value

HasId

string getId()

No description

Return Value

string

HasStatus status(string|Closure|null $status)

No description

Parameters

string|Closure|null $status

Return Value

HasStatus

string|null getStatus()

No description

Return Value

string|null

HasStatus danger()

No description

Return Value

HasStatus

HasStatus info()

No description

Return Value

HasStatus

HasStatus success()

No description

Return Value

HasStatus

HasStatus warning()

No description

Return Value

HasStatus

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

HasColor color(string|array|Closure|null $color)

No description

Parameters

string|array|Closure|null $color

Return Value

HasColor

HasColor defaultColor(string|array|Closure|null $color)

No description

Parameters

string|array|Closure|null $color

Return Value

HasColor

string|array|null getColor()

No description

Return Value

string|array|null

| array{50: string, 100: string, 200: string, 300: string, 400: string, 500: string, 600: string, 700: string, 800: string, 900: string, 950: 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

static Notification fromDatabase(DatabaseNotification $notification)

No description

Parameters

DatabaseNotification $notification

Return Value

Notification

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

No description

Parameters

Notification|string|null $notification

Return Value

void

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

No description

Parameters

Notification|string|null $notification

Return Value

void