for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Adminetic\Website\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class PaymentRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
return true;
}
public function prepareForValidation()
$this->merge([
'type' => $this->payment->getRawOriginal('type') ?? 2,
]);
* Get the validation rules that apply to the request.
* @return array<string, mixed>
public function rules()
return [
'amount' => 'required|numeric',
'particular' => 'nullable|max:255',
'type' => 'required|numeric',
];