0
mongodbデータを操作するのにlaravel-mongodb
(https://github.com/jenssegers/laravel-mongodb)を使用しています。laravel-mongodbを使って新しいMongoDBコレクションを作成するには?
laravel-mongodbを使って新しいMongoDBコレクションを作成する方法は?例えば
:
public function test()
{
$newArtciels = DB::connection('mongodb')->collection('articles')->where('status', '1')->get();
//I want to ceate a new collection `new_artciels`, and save `$newArtciels` into `new_artciels`,how to write next?
}
質問:
私は新しいコレクションnew_artciels
をceate、およびnew_artciels
に$newArtciels
を保存したい、私は何をすべき?