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

    Laravel 5 and Vue JS CRUD with Pagination example and demo from scratch

    Laravel 5 and Vue JS CRUD with Pagination example and demo from scratch

    Open Post

    How to create authentication(login and registration) in Laravel 5.2?

    How to create authentication(login and registration) in Laravel 5.2?

    Open Post

    How to get filename from file path in MySQL?

    How to get filename from file path in MySQL?

    Open Post

    How to integrate stripe payment gateway in Laravel 5.4 Application ?

    How to integrate stripe payment gateway in Laravel 5.4 Application ?

    Open Post

    Laravel 5.3 - whereDate(), whereMonth(), whereDay() and whereYear() examples.

    Laravel 5.3 - whereDate(), whereMonth(), whereDay() and whereYear() examples.

    Open Post

    Laravel 5.3 - image dimension validation rules example

    Laravel 5.3 - image dimension validation rules example

    Open Post