查询构造器 小坑

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/cofecode/article/details/83592631
$re = DB::table('users') -> first();

注意,这里取到的是对象

而使用get() 查到的是个数组。

 $re = DB::table('users') -> get();

容易弄错,小坑,记录一下

猜你喜欢

转载自blog.csdn.net/cofecode/article/details/83592631
今日推荐