Laravel 5.7.15 is available with a new validation rule and Eloquent relationship getters — first, the
starts_with validation rule which allows you to check that an input starts with a string.
$request->validate([ 'greeting' => 'starts_with:hello', ]);
You can also pass multiple strings, in which the rule will pass if at least one matches the input:
$request->validate([ 'greeting' => 'starts_with:hello,hola', ]);
date_equals validation rule is now translatable, and you should update your
resources/lang/en/validation.php file with the following:
'date_equals' => 'The :attribute must be a date equal to :date.',
You can see the pull request to laravel/laravel for the new translation key.
New relationship getters are available in this release including:
date_equalsvalidation message (#26584)
starts_withvalidation rule (#26612)
- Added relationship getters
Laravel has a wrap method and `array_wrap()` helper to normalize values into an array. Raul (@rcubitto) shared this n…
Global Application Settings
In applications it is often useful to have a way to store some global settings. These settings are not related to a s…