add refund and event logic
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Refunds;
|
||||
|
||||
use App\Http\Requests\ApiFormRequest;
|
||||
use App\Models\Refund;
|
||||
|
||||
class RefundDecisionRequest extends ApiFormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->user() !== null;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'status' => ['required', 'string', 'in:' . implode(',', [
|
||||
Refund::STATUS_APPROVED,
|
||||
Refund::STATUS_REJECTED,
|
||||
])],
|
||||
'reason' => ['required', 'string', 'max:2000'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user