📜  Laravel OrderBy on Eloquent whereHas 关系 - PHP 代码示例

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

代码示例2
$counties = County::whereHas('items', function ($query) {
    $query->where('approved', 1);
})->orderBy('name')->get();