bosnadev / repository

Laravel Repositories is a package for Laravel 5 which is used to abstract the database layer. This makes applications much easier to maintain.

Home Page:https://bosnadev.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

where concat

carlituxman opened this issue · comments

Hi, how can I do a findwhere with concat
something like

select * from TABLE where concat( name, lastname, email ) like %misearch%

I answer me:

$q = $this->model->findWhere([
[DB::raw("CONCAT(name,lastname,lastname2)"), 'LIKE', "%$query%"]
]);