You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

32 lines
611 B

<?php
namespace Illuminate\Notifications;
use Illuminate\Database\Eloquent\Collection;
class DatabaseNotificationCollection extends Collection
{
/**
* Mark all notifications as read.
*
* @return void
*/
public function markAsRead()
{
$this->each(function ($notification) {
$notification->markAsRead();
});
}
/**
* Mark all notifications as unread.
*
* @return void
*/
public function markAsUnread()
{
$this->each(function ($notification) {
$notification->markAsUnread();
});
}
}