where condition with laravel code example
Example 1: laravel chunk select
DB::table('users')->chunk(100, function($users)
{
foreach ($users as $user)
{
//
}
});
Example 2: 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();