I would like to use the laravel default functionality to show the error, but in another language. I don't need a "nice name", but a translation for the **:attribute value in lang files. Right now if I just use:
<input type="text" placeholder="{{ trans('generic.phone') }}" name="phone" value="{{ old('phone') }}">
@if ($errors->has('phone'))
<span class="help-block">
<strong>{{ $errors->first('phone') }}</strong>
</span>
@endif
it works perfectly, because the :attribute takes the field phone, and in the validation language I have:
'required' => 'The :attribute field is required.',
But how to manage phone field with a language file?
Do I must have to write a custom error for each field? Please tell me I don't.
The following function is just a wrong example to let you understand what I'm trying to do
@if ($errors->has('phone'))
<strong>{{ $errors->first(trans('generic.phone')) }}</strong>
@endif