how to concat in where clause like laravel query builder

106

how to concat in where clause like laravel query builder -

$query = DB::table('mbo_party')->where(DB::raw("CONCAT(first,' ',last)"), 'LIKE', '%' . $party_name . '%')->first();

concat in where clause laravel query builder -

$query->orWhere(DB::raw("CONCAT(`nvp`, ' ', `vpv`)"), 'LIKE', "%".$this->searchNeedle."%");

Comments

Submit
0 Comments