I have a mysql query that I can not figure out how to translate into Laravel query in controller
The 355 will be a variable as soon as I can get this to run.
SELECT somascourseregistrations.id, `CourseID`, `StudentID`, `StatusID`, `TA`, `DropDate`, `TuitionType`, (`ClassFee`+`HomeOfficeFee`+`MaterialsFee`) AS TotalTuition, (SELECT SUM(`PaymentAmount`) AS TotalPayments FROM `somasstudentclasspayments` WHERE somasstudentclasspayments.RegistrationID = somascourseregistrations.id) TotalPayments FROM `somascourseregistrations` WHERE somascourseregistrations.CourseID = 355
Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.