I have three database fields that I need to add together and place in view. I'm using a ajax call to pull the data. I'm pulling the line of data from the database in the first collection that is created called Tuitions.
Then I"m adding the fields together in $TuitionTotal
Now I need to put the $TuitionTotal - Key 'TuitionTotal' and Value "140" back into the collection array But I have not been able to find anything that works.
$Tuitions = Tuition::where('id', $id)->get(); $TuitionTotal = $Tuitions->ClassFee + $Tuitions->HomeOfficeFee + $Tuitions->MaterialsFee ;