📌  相关文章
📜  带有查询参数的 laravel eloquent - PHP 代码示例

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

代码示例1
$campaign = Campaign::find($campaign_id);
    $buyers = $campaign->buyers()->with('notes')->with(['emails' => function($q) use ($campaign_id){
        $q->where('campaign_id', $campaign_id);
    }])->get();