I'm saving data that pass my validation. The validation is setted in a array called $rules:
$rules = array(
'name_field' => 'required|unique:users',
'number_in_db' => 'required',
);
$validator = Validator::make($request->all(), $rules);
if ($validator->passes()) {
MyModel::create($request->input());
return redirect()->route('some.route')->withFlashSuccess('Done!');
} else
return redirect()->back()->withInput()->withErrors($validator);
Works fine, but when it redirects to the view with the errors, it is showing me the field names exactly as the array, for example: "The name_field is already registered". How can I declare a custom name for every field? and for example have something like "The Name is already registered".