Hello MisterMike,
I never used replicate, but it seems to me that you have an error.
$oldCourse = Course::with('author')->where('course_id','=',$course_id)->get();
will return a collection of courses, not a signle course. Use this instead.
$oldCourse = Course::with('author')->where('course_id','=',$course_id)->first();
Hope it helps. Gern geschehen!
Yes my same conclusion. The replicate method is found on Eloquent Models not Collections
That is your issue.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community