Izveidot aplikāciju, kura ik pēc noteikta intervāla (60 sekundes) veic ierakstu datubāzē izmantojot Laravel freimworka iebūvēto funkcionalitāti.
<?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();
});
}
}