0

laravel 随机排序读取数据 ?

liz created at6 years ago view count: 2529
report
回复
0

参考官方文档:https://laravel.com/docs/5.4/queries

$randomUser = DB::table('users')
                ->inRandomOrder()
                ->first();
6 years ago 回复