*/ public function handle(Member $member): Collection { return $member->courses()->with('course')->get(); } public function asController(Member $member): AnonymousResourceCollection { return CourseMemberResource::collection($this->handle($member)) ->additional([ 'meta' => CourseMemberResource::memberMeta($member), ]); } }