How to select concat columns with Laravel Query Builder?By Hardik Savani | April 30, 2016 | | 3095 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
- How to change app version code in Ionic framework
- How to create Pagination using dirPagination directive in Angularjs example with demo ?
- Laravel 5 - How to create custom error page with example
- How to get year, month and day from timestamp date using carbon in Laravel 5?
- How to get current url with parameters in Laravel 5?
- How to get current controller name in view Laravel 5?
- Codeigniter Angularjs http post not working
- How to check if record exists or not in Laravel 5?