PHP Class Fenos\Notifynder\Models\Notification

Inheritance: extends Illuminate\Database\Eloquent\Model
Afficher le fichier Open project: fenos/notifynder Class Usage Examples

Protected Properties

Свойство Type Description
$fillable array

Méthodes publiques

Méthode Description
__construct ( array $attributes = [] ) Notification constructor.
body ( ) : BelongsTo
from ( ) : BelongsTo | Illuminate\Database\Eloquent\Relations\MorphTo
getCustomFillableFields ( ) : mixed Get custom required fields from the configs so that we can automatically bind them to the model fillable property.
getExtraAttribute ( $value ) : ExtraParams
getNotifyBodyAttribute ( ) : string Get parsed body attributes.
getStack ( ) : null | Illuminate\Database\Eloquent\Collection Get the full stack of notifications if this has one.
getTextAttribute ( ) : string Get parsed body attributes.
hasStack ( ) : boolean Check if this notification is part of a stack.
newCollection ( array $models = [] ) : NotifynderCollection | Illuminate\Database\Eloquent\Collection Custom Collection.
scopeByCategory ( $query, $category ) : mixed Filter Scope by category.
scopeByStack ( $query, $stackId ) : mixed Filter Scope by stack.
scopeOnlyExpired ( $query ) : mixed Only Expired Notification scope.
scopeWherePolymorphic ( $query, $toId, $type ) : mixed Where Polymorphic.
scopeWithNotRead ( $query ) : mixed Not read scope.
to ( ) : BelongsTo | Illuminate\Database\Eloquent\Relations\MorphTo

Méthodes protégées

Méthode Description
mergeFillable ( ) : array

Method Details

__construct() public méthode

Notification constructor.
public __construct ( array $attributes = [] )
$attributes array

body() public méthode

public body ( ) : BelongsTo
Résultat Illuminate\Database\Eloquent\Relations\BelongsTo

from() public méthode

public from ( ) : BelongsTo | Illuminate\Database\Eloquent\Relations\MorphTo
Résultat Illuminate\Database\Eloquent\Relations\BelongsTo | Illuminate\Database\Eloquent\Relations\MorphTo

getCustomFillableFields() public méthode

Get custom required fields from the configs so that we can automatically bind them to the model fillable property.
public getCustomFillableFields ( ) : mixed
Résultat mixed

getExtraAttribute() public méthode

public getExtraAttribute ( $value ) : ExtraParams
$value
Résultat Fenos\Notifynder\Notifications\ExtraParams

getNotifyBodyAttribute() public méthode

Get parsed body attributes.
public getNotifyBodyAttribute ( ) : string
Résultat string

getStack() public méthode

Get the full stack of notifications if this has one.
public getStack ( ) : null | Illuminate\Database\Eloquent\Collection
Résultat null | Illuminate\Database\Eloquent\Collection

getTextAttribute() public méthode

Get parsed body attributes.
public getTextAttribute ( ) : string
Résultat string

hasStack() public méthode

Check if this notification is part of a stack.
public hasStack ( ) : boolean
Résultat boolean

mergeFillable() protected méthode

protected mergeFillable ( ) : array
Résultat array

newCollection() public méthode

Custom Collection.
public newCollection ( array $models = [] ) : NotifynderCollection | Illuminate\Database\Eloquent\Collection
$models array
Résultat NotifynderCollection | Illuminate\Database\Eloquent\Collection

scopeByCategory() public méthode

Filter Scope by category.
public scopeByCategory ( $query, $category ) : mixed
$query
$category
Résultat mixed

scopeByStack() public méthode

Filter Scope by stack.
public scopeByStack ( $query, $stackId ) : mixed
$query
$stackId
Résultat mixed

scopeOnlyExpired() public méthode

Only Expired Notification scope.
public scopeOnlyExpired ( $query ) : mixed
$query
Résultat mixed

scopeWherePolymorphic() public méthode

Where Polymorphic.
public scopeWherePolymorphic ( $query, $toId, $type ) : mixed
$query
$toId
$type
Résultat mixed

scopeWithNotRead() public méthode

Not read scope.
public scopeWithNotRead ( $query ) : mixed
$query
Résultat mixed

to() public méthode

public to ( ) : BelongsTo | Illuminate\Database\Eloquent\Relations\MorphTo
Résultat Illuminate\Database\Eloquent\Relations\BelongsTo | Illuminate\Database\Eloquent\Relations\MorphTo

Property Details

$fillable protected_oe property

protected array $fillable
Résultat array