26 lines
568 B
PHP
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();
|
|
}
|
|
}
|