51 lines
1.4 KiB
PHP
51 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace Modules\Writeoff\Http\Requests\DetailPenagihan;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StoreDetailPenagihanRequest 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 [
|
|
'nomor_pinjaman' => 'nullable|string',
|
|
'tanggal_penagihan' => 'nullable|date',
|
|
'tindakan' => 'nullable|string',
|
|
'informasi_lku' => 'nullable|string',
|
|
'pic_penagihan' => 'nullable|string',
|
|
'prose_hukum' => 'nullable|string',
|
|
'komitmen_debitur' => 'nullable|string',
|
|
'status' => 'nullable',
|
|
];
|
|
}
|
|
|
|
public function ignored()
|
|
: string
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
protected function prepareForValidation()
|
|
{
|
|
$this->merge([
|
|
'nomor_pinjaman' => $_SESSION['nomor_pinjaman'],
|
|
]);
|
|
}
|
|
}
|