Laravel Model – Want to check where (or) orWhere in DB::raw - development

Laravel Model – Want to check where (or) orWhere in DB::raw

This is my model function now its working correctly, but i want to check where (or) orwhere. I Already try that but cant get the apt answer

public static function getPlacementCountByStatus(){
        $countStatus = DB::table('placements')->where('status','1')->select(DB::raw('count(joborderid) as total, joborderid'))->groupBy('joborderid')->get();
    return $countStatus;
    }

I want to check something like this

->where('statusid','=','3')->orWhere('statusid','=','4')->orWhere('stageid','=','4')->orWhere('stageid','=','8');

// i want to check this in my $countStatus something like and or condition in my db::raw query



from Laravel Questions and Answers https://laravelquestions.com/laravel/laravel-model-want-to-check-where-or-orwhere-in-dbraw/
via Lzo Media

Comments

Popular posts from this blog

ng-show doesn’t work correct with value boolean

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development

ng-include of inline SVG does not display gradient except in Chrome