PayServicePackageRequest.php 618 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Http\Requests;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. class PayServicePackageRequest extends FormRequest
  5. {
  6. public function authorize(): bool
  7. {
  8. return true;
  9. }
  10. public function rules(): array
  11. {
  12. return [
  13. 'payment_method' => ['required', 'in:credit_card,pix'],
  14. 'client_payment_method_id' => ['nullable', 'integer', 'exists:client_payment_methods,id'],
  15. 'card_id' => ['nullable', 'string', 'max:255'],
  16. 'phone' => ['nullable', 'string', 'max:20'],
  17. ];
  18. }
  19. }