How to select concat columns with Laravel Query Builder?By Hardik Savani | April 30, 2016 | | 15281 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
- Laravel 5 - How to create API Authentication using Passport ?
- Laravel 5 amazon s3 file upload tutorial - Part 1
- How to create and use Middleware in Laravel 5?
- Laravel 5 - Confirmation before delete record from database example
- Laravel 5 - How to implement gravatar image using thomaswelton/laravel-gravatar package
- How to implement infinite ajax scroll pagination in Laravel 5?
- AngularJS - How to create read more/less toggle using Directive?
- Laravel 5 create word document file using phpoffice/phpword package