How to select concat columns with Laravel Query Builder?By Hardik Savani | April 30, 2016 | | 8944 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
- PHP download file from url using curl example
- Laravel 5 - Image Upload and Resize Example using Intervention Image Package
- How to set scroll to bottom in jquery?
- Mailgun setup with Laravel 5 example
- How to create snippets in sublime ?
- How to clear log file using command in laravel 5 ?
- How to get Lat and Lon from google map API in Jquery PHP?
- How to get current route name in Laravel 5?