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 | | 19980 Viewer | Category : Laravel
READ MORE

    How to send mail using mailable in laravel 5.3?

    How to send mail using mailable in laravel 5.3?

    Open Post

    How to delete multiple records using checkbox in Laravel 5 ?

    How to delete multiple records using checkbox in Laravel 5 ?

    Open Post

    PHP - import excel file into mysql database tutorial

    PHP - import excel file into mysql database tutorial

    Open Post

    How to make simple dependent dropdown using jquery ajax in Laravel 5?

    How to make simple dependent dropdown using jquery ajax in Laravel 5?

    Open Post

    Dynamic Autocomplete search using Bootstrap Typeahead JS Example

    Dynamic Autocomplete search using Bootstrap Typeahead JS Example

    Open Post

    Laravel 5 - "syntax error or access violation 1055 in group by" Solved

    Laravel 5 - "syntax error or access violation 1055 in group by" Solved

    Open Post