国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

webman mongo數(shù)據(jù)如何只獲取一條記錄

聽淚無言

<?php
namespace app\controller;

use support\Request;
use support\Db;

class User
{
public function db(Request $request)
{
Db::connection('mongodb')->collection('test')->insert([1,2,3]);
return json(Db::connection('mongodb')->collection('test')->get());
}
}
初試webman
get()獲取所有記錄的對(duì)象
請(qǐng)問有存在返回一條記錄的方法 謝謝

2051 1 0
1個(gè)回答

phpcreeper

好像是有個(gè)first()方法吧,看你想要返回一條什么樣的記錄,具體看第三方手冊(cè):
https://github.com/jenssegers/laravel-mongodb
webman默認(rèn)使用 jenssegers/mongodb 作為mongodb組件。

年代過于久遠(yuǎn),無法發(fā)表回答
??