📜  以随机顺序 laravel - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:01.680000             🧑  作者: Mango

代码示例4
Model::select('column')->where('column','value')->inRandomOrder()
    ->limit(2) // here is yours limit
    ->get();

------------------ OR --------------------

Model::inRandomOrder()->select('column')->where('column','value')->first();