mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-04 11:45:00 +02:00
26 lines
641 B
PHP
26 lines
641 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Api\Field\User\Notification;
|
|
|
|
use App\Contracts\Http\Api\Field\SelectableField;
|
|
use App\Http\Api\Field\Field;
|
|
use App\Http\Api\Query\Query;
|
|
use App\Http\Api\Schema\Schema;
|
|
use App\Models\User\Notification;
|
|
|
|
class NotificationNotifiableIdField extends Field implements SelectableField
|
|
{
|
|
public function __construct(Schema $schema)
|
|
{
|
|
parent::__construct($schema, Notification::ATTRIBUTE_NOTIFIABLE_ID);
|
|
}
|
|
|
|
public function shouldSelect(Query $query, Schema $schema): bool
|
|
{
|
|
// Needed to filter the user notifications on query.
|
|
return true;
|
|
}
|
|
}
|