29 lines
682 B
PHP
29 lines
682 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Site\AccessTokens;
|
|
|
|
use App\Contracts\FormRequestDto;
|
|
use App\Dto\Service\Site\AccessTokens\Index;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
final class IndexRequest extends FormRequest implements FormRequestDto
|
|
{
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
$this->redirect = route('profile.access-tokens.index');
|
|
return [
|
|
'page' => ['nullable', 'numeric', 'min:1']
|
|
];
|
|
}
|
|
|
|
public function getDto(): Index
|
|
{
|
|
return new Index(
|
|
page: (int) $this->input('page', 1)
|
|
);
|
|
}
|
|
}
|