{!! \Spatie\SchemaOrg\Schema::review() ->author( \Spatie\SchemaOrg\Schema::person() ->name($testimonial->author) ->image(getProfileImage($testimonial->image, $testimonial->author)) ->role($testimonial->profession) ) // Use Course as the reviewed item type for valid schema ->itemReviewed( \Spatie\SchemaOrg\Schema::course() ->name($testimonial->course->title ?? 'Website') ) ->reviewRating( \Spatie\SchemaOrg\Schema::rating() ->ratingValue($testimonial->star) ->bestRating(5) ) ->reviewBody($testimonial->body) ->toScript(); !!}