📜  带有回调的 laravel - PHP 代码示例

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

代码示例1
$users = User::with(['posts' => function($query)
{
    $query->orderBy('created_at', 'desc');

}])->get();