vendredi 4 août 2017

how to write sql 'like' statement in laravel

How would you write the following query in laravel style:

SELECT * FROM `job_details` WHERE `job_title` LIKE '%officer%' AND `category_id` = 1 AND `city_id` = 1

I tried something below but it does not work:

DB::(job_details)->where(job_title LIKE '%officer%')->and(category_id=1)->and(city_id=1)

Please HElo



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2vwTpEK
via IFTTT

Aucun commentaire:

Enregistrer un commentaire