Add code inside of your controller and make the function this easiest way to make custom messages in methods when you want to validate requests:

public function create()
{
    request()->validate([
        'name' => 'required',
        'description' => 'required'
    ],
    [
        'name.required' => 'A name is required',
        'description.required' => 'A description is required'
    ]);
}
Leave a Comment