Hello @jbiddulph
The problem is that you access the $course->en variabele that is delivered with the magic __get() function and directly change it.
What you can do is:
$en = $course->en;
$en["config"]["coursesuite"] = $req->coursesuite;
$en["config"]["coursename"] = $req->coursename;
$en["config"]["courseid"] = $req->courseid;
$en["config"]["lms"] = $req->lms;
$en["config"]["defaultlang"] = $req->defaultlang;
$course->en = $en;
$result = $course->save();
if($result) {
return ["result"=>"Data is updated successfully"];
} else {
return ["result"=>"update operation failed"];
}
With this method you get the variable, update it and then save it.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community