Writeoff/Http/Requests/DetailSubrogasiJamkrindo/StoreDetailSubrogasiJamkrindoRequest.php

48 lines
1.2 KiB
PHP
Raw Normal View History

2023-12-19 11:00:24 +00:00
<?php
namespace Modules\Writeoff\Http\Requests\DetailSubrogasiJamkrindo;
use Illuminate\Foundation\Http\FormRequest;
class StoreDetailSubrogasiJamkrindoRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize()
: bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\Rule|array|string>
*/
public function rules()
: array
{
return [
'tanggal_pembayaran' => 'required|date',
'pembayaran_debitur' => 'required|numeric',
'subrogasi_jamkrindo' => 'required|numeric',
'pendapatan_bank' => 'required|numeric',
'keterangan' => 'nullable|string|max:255',
];
}
public function ignored()
: string
{
return $this->id;
}
protected function prepareForValidation()
{
$this->merge([
2024-03-25 07:49:47 +00:00
'nomor_pinjaman' => request()->segment(3),
2023-12-19 11:00:24 +00:00
]);
}
}