2023-12-13 19:01:27 -03:00

26 lines
568 B
PHP

<?php
declare(strict_types=1);
namespace App\Repositories\Notifications;
use App\Models\Notifications;
use App\Repositories\AbstractRepository;
class NotificationRepository extends AbstractRepository implements NotificationContractInterface
{
public function __construct(Notifications $notification)
{
parent::__construct($notification);
}
public function getNotify(): int
{
return Notifications::query()
->with('users')
->whereRelation('users', 'id', '=', auth()->id())
->count();
}
}