@extends('layouts.app') @section('title', $app_setting['name'] . ' | Review List') @section('content')
@foreach ($reviews as $review) @endforeach
# Course Student Rating Comment Action
{{ $loop->iteration }}

@if (strlen($review->course?->title) > 30) {{ substr($review->course?->title, 0, 30) . '...' }} @else {{ $review->course?->title ?? 'N/A' }} @endif

{{ $review->user?->name }} @php $rating = $review->rating; $fullStars = floor($rating); $hasHalfStar = $rating - $fullStars >= 0.5; @endphp @for ($i = 1; $i <= 5; $i++) @if ($i <= $fullStars) @elseif ($hasHalfStar && $i == ceil($rating)) @else @endif @endfor @if (strlen($review->comment) > 50) {{ substr($review->comment, 0, 50) . '...' }} @else {{ $review->comment }} @endif
@endsection