<?phpnamespaceIlluminate\Notifications;traitHasDatabaseNotifications{/** * Get the entity's notifications. */publicfunctionnotifications(){return$this->morphMany(DatabaseNotification::class,'notifiable')->orderBy('created_at','desc');}/** * Get the entity's read notifications. */publicfunctionreadNotifications(){return$this->morphMany(DatabaseNotification::class,'notifiable')->whereNotNull('read_at')->orderBy('created_at','desc');}/** * Get the entity's unread notifications. */publicfunctionunreadNotifications(){return$this->morphMany(DatabaseNotification::class,'notifiable')->whereNull('read_at')->orderBy('created_at','desc');}}