mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-23 04:46:07 +02:00
38 lines
933 B
PHP
38 lines
933 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\GraphQL\Schema\Queries\Models\Pagination\Admin;
|
|
|
|
use App\Constants\FeatureConstants;
|
|
use App\GraphQL\Schema\Queries\Models\Pagination\EloquentPaginationQuery;
|
|
use App\GraphQL\Schema\Types\Admin\FeatureType;
|
|
use App\Models\Admin\Feature;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
|
|
class FeaturePaginationQuery extends EloquentPaginationQuery
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct('featurePagination');
|
|
}
|
|
|
|
public function description(): string
|
|
{
|
|
return 'Returns a listing of feature resources given fields.';
|
|
}
|
|
|
|
/**
|
|
* The base return type of the query.
|
|
*/
|
|
public function baseType(): FeatureType
|
|
{
|
|
return new FeatureType();
|
|
}
|
|
|
|
protected function query(Builder $builder, array $args): Builder
|
|
{
|
|
return $builder->where(Feature::ATTRIBUTE_SCOPE, FeatureConstants::NULL_SCOPE);
|
|
}
|
|
}
|