Wednesday, February 28, 2018

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

No comments:

Post a Comment