📌  相关文章
📜  Cómo excluir modelos con datos de relación de null - PHP 代码示例

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

代码示例1
Route::get('/offers', function(){
    $offers = \App\Models\Issuers\Offer::with('offerStatus')->whereHas('offerStatus' , function ($offerStatus){
        $offerStatus->whereIn('name',['live', 'suspended', 'teaser','open']);
    })->get();
    return view('layouts/frontend/offers/index', compact('offers'));
});