max results per page improvement

This commit is contained in:
pushrbx 2023-06-29 21:02:28 +01:00
parent fe92476815
commit 4cf1fb2926

View File

@ -5,13 +5,12 @@ namespace App\Rules\Attributes;
use App\Rules\MaxResultsPerPageRule;
use Attribute;
use Spatie\LaravelData\Attributes\Validation\Rule;
use Illuminate\Support\Facades\App;
#[Attribute(Attribute::TARGET_PROPERTY)]
final class MaxLimitWithFallback extends Rule
{
public function __construct()
{
parent::__construct(new MaxResultsPerPageRule(App::make("jikan-config")->maxResultsPerPage()));
parent::__construct(new MaxResultsPerPageRule(max_results_per_page()));
}
}