Tag : Mysql Concat


How to select concat columns with Laravel Query Builder?

We are always wanted to use sql query for concatenate fullname or something to concat using mysql concat function, now if you think how to use concat function in laravel query builder then this post can help you. So, if you need to use concat mysql function then see bellow example: <strong>Example:</strong> <pre class="prettyprint lang-php"> $user = User::select("users.*" ,DB::raw("CONCAT(users.first_name,' ',users.last_name) as full_name")) ->get(); print_r($user); </pre>

By Hardik Savani | April 30, 2016 | | 6232 Viewer | Category : Laravel
READ MORE

    Jquery - input tags plugin example using jquery.tagsinput.js plugin

    Jquery - input tags plugin example using jquery.tagsinput.js plugin

    Open Post

    Laravel 5 - Paypal Payment Integration example using netshell/paypal package from scratch

    Laravel 5 - Paypal Payment Integration example using netshell/paypal package from scratch

    Open Post

    AngularJS - scroll to a specific element using anchorscroll

    AngularJS - scroll to a specific element using anchorscroll

    Open Post

    PHP - Input multiple tags with dynamic autocomplete example

    PHP - Input multiple tags with dynamic autocomplete example

    Open Post

    How to disable model timestamps in Laravel 5.3?

    How to disable model timestamps in Laravel 5.3?

    Open Post

    AngularJS - Display Default image if original image does not exists with example

    AngularJS - Display Default image if original image does not exists with example

    Open Post