0

Please let me clear about the syntax.My question is that ,How to write the below query Laravel 4.2 query builder?

SELECT * FROM table WHERE 123 IN (col1, col2, col3, col4);

How to write query in Laravel 4.2? In that i have to search string in multiple column.

Manish
  • 3,443
  • 1
  • 21
  • 24

1 Answers1

0

Try this

DB::table('table')->whereRaw('123 in (col1, col2, col3, col4));

OR

If you made model for the tabel

table::whereRaw('123 in (col1, col2, col3, col4));
Manish
  • 3,443
  • 1
  • 21
  • 24