Reputation: 2400
How can i translate the attribute, now the output is: companyname is verplicht. (dutch)
Validation.php
'required' => ':attribute is verplicht.',
Controller:
$rules = array(
'companyname' => 'required'
;
View:
{{ Form::text( 'companyname' , null, array( 'class' => 'form-control' ) ) ) }}
Upvotes: 11
Views: 10454
Reputation: 1057
You need to edit the app/resources/lang/your-language/validation.php and at the bottom you will see an attribute array.
Following your example just add:
'attributes' => [
'companyname' => 'Your Custom Name'
],
Hope this helps!
Upvotes: 30