Deprecated: Hook custom_css_loaded is deprecated since version jetpack-13.5! Use WordPress Custom CSS instead. Jetpack no longer supports Custom CSS. Read the WordPress.org documentation to learn how to apply custom styles to your site: https://wordpress.org/documentation/article/styles-overview/#applying-custom-css in /home/everyuseful/public_html/wp-includes/functions.php on line 6078
How to make a concatenate in Laravel select using Query Builder - EveryUseful

How to make a concatenate in Laravel select using Query Builder

If you want to make a concatenate between 2 columns inside of your select in Laravel you can simply use DB::raw(‘CONCAT(…

Here is an example

User::select(
          'id',
          DB::raw('CONCAT(first_name," ",last_name) as full_name')
        )
       ->orderBy('full_name')
       ->get();

Leave a Reply

Your email address will not be published. Required fields are marked *