123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace App\Http\Requests\Client\Wechat;
- use Illuminate\Foundation\Http\FormRequest;
- class GetAuthUrlRequest extends FormRequest
- {
-
- public function authorize(): bool
- {
- return true;
- }
-
- public function rules(): array
- {
- return [
- 'redirect_uri' => ['required', 'url'],
- 'scope' => ['nullable', 'string', 'in:snsapi_base,snsapi_userinfo'],
- ];
- }
-
- public function attributes(): array
- {
- return [
- 'redirect_uri' => '回调地址',
- 'scope' => '授权范围',
- ];
- }
- }
|