Вход Регистрация
Файл: vendor/laravel/framework/src/Illuminate/Notifications/HasDatabaseNotifications.php
Строк: 46
<?php

namespace IlluminateNotifications;

trait 
HasDatabaseNotifications
{
    
/**
     * Get the entity's notifications.
     *
     * @return IlluminateDatabaseEloquentRelationsMorphMany
     */
    
public function notifications()
    {
        return 
$this->morphMany(DatabaseNotification::class, 'notifiable')->latest();
    }

    
/**
     * Get the entity's read notifications.
     *
     * @return IlluminateDatabaseQueryBuilder
     */
    
public function readNotifications()
    {
        return 
$this->notifications()->read();
    }

    
/**
     * Get the entity's unread notifications.
     *
     * @return IlluminateDatabaseQueryBuilder
     */
    
public function unreadNotifications()
    {
        return 
$this->notifications()->unread();
    }
}
Онлайн: 1
Реклама