[Laravel] 5.7.25がリリースされました
laravel/frameworkのバージョン5.7.25がリリースされました。追加された機能について確認します。
日付に関連するバリデーションエラーのメッセージがカスタマイズ可能になりました
以下のバリデーションにおいて、resources/lang/ja/validation.php等で定義されいるメッセージのうち:dateを用いて置換される値の変更が可能になりました。
- after_or_equal
- before
- before_or_equal
- date_equals
例えばdate_equals:tomorrowを利用する場合には、tomorrowを置換する文言をしていします。
php
// en/validation.php
'values' => [
'date' => [
'tomorrow' => 'the day after today',
],
],
// => The date must be a date equal to the day after today.MSSQL grammarにcomputed columnのサポートが追加されました
php
$blueprint = new Blueprint('products');
$blueprint->integer('price');
$blueprint->computed('discounted_virtual', 'price - 5');
$blueprint->computed('discounted_stored', 'price - 5')->persisted();
// => alter table "products" add "price" int not null, "discounted_virtual" as (price - 5), "discounted_stored" as (price - 5) persisted環境設定でCacheファイルのパスを設定可能になりました
bootstrap/cache内のservices、packages、routesをそれぞれ指定できます。
php
// .env
APP_SERVICES_CACHE=services cache file path
APP_PACKAGES_CACHE=packages cache file path
APP_ROUTES_CACHE=routes cache file path詳しい変更については以下を確認してください。