first
This commit is contained in:
25
app/Http/Requests/Kewangan/UpdateBankVerificationRequest.php
Normal file
25
app/Http/Requests/Kewangan/UpdateBankVerificationRequest.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Kewangan;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateBankVerificationRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->user()?->hasAnyRole(['Admin Kewangan', 'Admin']) === true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'status' => ['required', Rule::in(['pending', 'verified', 'rejected', 'requires_correction'])],
|
||||
'finance_note' => ['nullable', 'string', 'max:2000'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user