Answers for "Cómo excluir modelos con datos de relación de null"

PHP
0

Cómo excluir modelos con datos de relación de null

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'));
});
Posted by: Guest on July-16-2021

Code answers related to "Cómo excluir modelos con datos de relación de null"

Browse Popular Code Answers by Language