当在查询下面执行时,它给了我对象数组而不是stdClass对象。我正在使用Laravel 5.2和Mongodb。请帮忙
$student = DB::table('students')->first();
print_r($student);
提前谢谢。
我想
你可以试试这个:
$student = DB::table('students')->first();
$student = (object)$student;
print_r($student)