Answers for "laravel select custom column"

PHP
0

laravel select custom column

$products = Product::select([
                            "id", 
                            "name", 
                            DB::raw("'10%' as tax"),
                            DB::raw("1 as active")
                        ])->get();
Posted by: Guest on June-26-2021

Code answers related to "laravel select custom column"

Browse Popular Code Answers by Language