0
我正在使用laravel-mongodb
(https://github.com/jenssegers/laravel-mongodb)來操縱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?
}
問:
我想ceate一個新的集合new_artciels
,並保存到$newArtciels
new_artciels
,我該怎麼辦?