Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel with and where

$projects = Project::whereHas('projectOffers', function ($offer) {
            $offer->where('teacher_id', "Ahmed");
            $offer->where('status_id', "Accepted");
        })->where('status_id', "inprogress")->get();
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel
ADD COMMENT
Topic
Name
4+2 =