How to select concat columns with Laravel Query Builder?By Hardik Savani | April 30, 2016 | | 6197 Viewer | Category : Laravel
Share this post:
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
- Laravel 5 - How to convert file(image, audio, video) extension using CloudConvert?
- Jquery Datepicker example code with demo using Jquery UI
- laravel 5 change date format using carbon example
- How to set gmail configration for mail in Laravel?
- Bootstrap SweetAlert - Confirm dialog box model with yes and no option example
- How to send mail using Sendgrid in laravel 5?
- How to remove comma from string in jquery with example ?
- Laravel 5 login with Linkedin using Socialite Package