Answers for "laravel where multiple conditions on single colmn"

PHP
1

laravel where multiple conditions on single colmn

//laravel
// here, i have used two different where condition on a single column
$today = Carbon::today();
$data = Users::where('type',1)
        ->where(function($query) use ($today) {
            return $query->whereDate('updated_at','!=', $today)
            ->orWhere('updated_at',null);
         })
         ->get();
Posted by: Guest on October-09-2020

Code answers related to "laravel where multiple conditions on single colmn"

Browse Popular Code Answers by Language