Skip to content

Commit 25e3443

Browse files
committed
Use Str::snake delimiter when formatting attribute names
Simplifies getDisplayableAttribute by passing the space delimiter directly to Str::snake instead of applying a separate str_replace.
1 parent 7796b9b commit 25e3443

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Validation/Concerns/FormatsMessages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public function getDisplayableAttribute($attribute)
295295
: $attribute;
296296
}
297297

298-
return str_replace('_', ' ', Str::snake($attribute));
298+
return Str::snake($attribute, ' ');
299299
}
300300

301301
/**

0 commit comments

Comments
 (0)