25 lines
472 B
PHP
25 lines
472 B
PHP
<?php
|
|
|
|
namespace App\Domains\Purchase\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class PaymentIntentRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return $this->user() !== null;
|
|
}
|
|
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'method' => ['required', 'string', Rule::in(['qr', 'transfer'])],
|
|
];
|
|
}
|
|
}
|