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

    Laravel 5.3 - image dimension validation rules example

    Laravel 5.3 - image dimension validation rules example

    Open Post

    Mailgun setup with Laravel 5 example

    Mailgun setup with Laravel 5 example

    Open Post

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Open Post

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Open Post

    How to integrate google map using gmaps.js in php example?

    How to integrate google map using gmaps.js in php example?

    Open Post

    Laravel 5.3 - How to create SEO friendly sluggable URL

    Laravel 5.3 - How to create SEO friendly sluggable URL

    Open Post