新しいものを追加
9493 ワード
さあ始めましょう、私はあなたと共有したいLaravel 9.7で新しいものを見つけました.クエリビルダのWhereables ()はコレクションを受け取ります.
https://github.com/laravel/framework/pull/41733
JSONパスを含むデータベースクエリは、配列インデックスブレースをサポートします
route exists ()パラメータ制約法
https://github.com/laravel/framework/pull/41794
ストリングスクワットヘルパー
https://github.com/laravel/framework/pull/41791
クエリビルダ"WhereJSONContainsKey ()"メソッド
https://github.com/laravel/framework/pull/41802
データベースキューのバッチジョブ遅延を有効にする
https://github.com/laravel/framework/pull/41758
https://github.com/laravel/framework/pull/41769
ソース:- https://laravel-news.com/laravel-9-7-0
ソース
https://github.com/laravel/framework/pull/41733
// Previously
$query
->whereBelongsTo($category[0])
->orWhereBelongsTo($category[1])
// ...
// Or...
$query->whereIn('category_id', $categories->modelKeys());
// >=9.7 can use collections:
$query->whereBelongsTo($categories);
$query->whereBelongsTo($categories, 'category');
DB::table('json_table')
->where('column->json_option[0]', 'foo')
->update(['column->json_option[0]', => 'bar']);
https://github.com/laravel/framework/pull/41794
Route::get('/foo/{bar}')->whereIn('bar', $values);
https://github.com/laravel/framework/pull/41791
$this->assertSame(
'laravel php framework',
Str::squish(' laravel php framework '));
$this->assertSame(
'laravel php framework',
Str::squish("laravel\t\tphp\n\nframework")
);
$this->assertSame(
'laravel php framework',
Str::squish('
laravel
php
framework
')
);
use Illuminate\Support\Str;
$string = Str::squish(' laravel framework ');
// laravel framework
https://github.com/laravel/framework/pull/41802
DB::table('users')
->whereJsonContainsKey('options->languages')
->get();
DB::table('users')
->whereJsonDoesntContainKey('options->language->primary')
->get();
DB::table('users')
->whereJsonContainsKey('options->2fa[0]')
->get();
DB::table('users')
->whereJsonDoesntContainKey('options->2fa[0][1]')
->get();
https://github.com/laravel/framework/pull/41758
use App\Jobs\ImportCsv;
use Illuminate\Bus\Batch;
use Illuminate\Support\Facades\Bus;
$batch = Bus::batch([
(new ImportCsv(1, 100))->delay($delay),
(new ImportCsv(101, 200))->delay($delay)
])->dispatch();
https://github.com/laravel/framework/pull/41769
DB::table('users')->whereNotNull('name')->get();
私はあなたが私と一緒に楽しんで、このリリースについての詳細を学ぶためにソースを検索し、もっと検索してください.私は、すべてのものを新しく捜しているあなたを崇拝します.ソース:- https://laravel-news.com/laravel-9-7-0
ソース
Reference
この問題について(新しいものを追加), 我々は、より多くの情報をここで見つけました https://dev.to/morcosgad/new-things-added-laravel-97-released-3a3mテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol