How to select concat columns with Laravel Query Builder?By Hardik Savani | April 30, 2016 | | 21445 Viewer | Category : Laravel
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:
$user = User::select("users.*"
,DB::raw("CONCAT(users.first_name,' ',users.last_name) as full_name"))
Tags :Example Laravel Laravel 4 Laravel 5 Laravel 5.2 Laravel Builder Laravel Eloquent Mysql Concat Query Builder
- How to retrieve number of twitter followers count without authentication or api ?
- How to get current controller name in view Laravel 5?
- Laravel 5 create and download zip file example using chumper/zipper composer package
- How to set URL without http of Other site in Laravel?
- Jquery - Timepicker with AM PM Example code with demo using jQuery Timepicker Plugin
- How to create ban/revoke user functionality in Laravel 5 example ?
- Response download with file in Laravel 5.3 example
- How to create Event for Mail sending in Laravel 5.2?