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

    Laravel 5 dynamic autocomplete search using select2 JS Ajax - Part 1

    Laravel 5 dynamic autocomplete search using select2 JS Ajax - Part 1

    Open Post

    Laravel 5 - elasticsearch with pagination example

    Laravel 5 - elasticsearch with pagination example

    Open Post

    How to create quick apache virtual host in Ubuntu?

    How to create quick apache virtual host in Ubuntu?

    Open Post

    How to check current password using hash check in Laravel 5.3?

    How to check current password using hash check in Laravel 5.3?

    Open Post

    Laravel 5 Instagram API tutorial with example

    Laravel 5 Instagram API tutorial with example

    Open Post

    Laravel 5.5 Simple CMS Website example using asgardcms

    Laravel 5.5 Simple CMS Website example using asgardcms

    Open Post