Tag : LIKE Query


Laravel 5 - like query example using eloquent where clause.

Whenever you require to use select like query in your application then you can easily use. Laravel 5 provide query builder and mysql like condition is very simple to use. So let's see bellow example did convert bellow sql query. <strong>SQL Example:</strong> <pre> SELECT * FROM `users` WHERE `name` LIKE '%hdtopi%'; </pre> <strong>Laravel Query Example:</strong> <pre> $search = 'hdtopi'; $user = User::where('name','LIKE',"%{$search}%") ->get(); print_r($user); </pre>

By Hardik Savani | April 28, 2016 | | 6889 Viewer | Category : Laravel
READ MORE

    PHP - How to convert HTML file to PDF using Dompdf library?

    PHP - How to convert HTML file to PDF using Dompdf library?

    Open Post

    How to implement Email Verification with Activation Code example from Scratch in Laravel 5.2 ?

    How to implement Email Verification with Activation Code example from Scratch in Laravel 5.2 ?

    Open Post

    How to install composer using command line in ubuntu ?

    How to install composer using command line in ubuntu ?

    Open Post

    Simple Highcharts Chart Example using PHP MySQL Database

    Simple Highcharts Chart Example using PHP MySQL Database

    Open Post

    PHP - How to Convert file(image, audio, video) extension using CloudConvert API?

    PHP - How to Convert file(image, audio, video) extension using CloudConvert API?

    Open Post

    Bootstrap form validation example with demo using validator.js plugin

    Bootstrap form validation example with demo using validator.js plugin

    Open Post