Answers for "Laravel hasmany withSum()"

PHP
0

Laravel hasmany withSum()

//Controller
$model = Model::withSum('relation', 'column_name');

//Blade
$sum = $model->ralation_sum_columnName;
Posted by: Guest on March-09-2022

Browse Popular Code Answers by Language