@extends('layouts.commontemp')
@section('title', ($movieData['flimname'] ?? 'விமர்சனம்') . ' - விமர்சனம் | Tamil Cinema News')
@section('body_class', 'page-template page-template-template-home1 page-template-template-home1-php page page-id-432 custom-background wp-embed-responsive theme-zox-news woocommerce-js')
@section('seo')
@endsection
@section('css')
@endsection
@section('content')
{{-- ======= REUSABLE SLUG HELPER ======= --}}
{{-- Usage: pass any article/review array to get its URL from slug --}}
{{-- $item['slug'] from API is like "/movie-review/rathnam/3436" --}}
{{-- We strip the leading slash and pass to url() helper --}}
@include('layouts.cini-detail-advt970x90')
{{ $movieData['flimname'] ?? '' }} - விமர்சனம்
தயாரிப்பு - {{ $movieData['pname'] ?? '' }} | இயக்கம் -
{{ $movieData['directorname'] ?? '' }}
{{-- ======= வந்த படங்கள் SLIDER — slug from API ======= --}}
@if(!empty($directorMovies) && count($directorMovies) > 1)
வந்த படங்கள்
@foreach($directorMovies as $movie)
@php
// 1. Try all possible ID keys
$mId = $movie['fid'] ?? $movie['id'] ?? $movie['uid'] ?? $movie['newsid'] ?? $movie['film_id'] ?? $movie['news_id'] ?? $movie['mid'] ?? $movie['movie_id'] ?? $movie['f_id'] ?? '';
$mSlugRaw = $movie['slug'] ?? '';
$trimmedSlug = trim($mSlugRaw, '/');
// 2. If ID is still empty, try to extract it from the end of the slug
if (!$mId && $trimmedSlug && str_contains($trimmedSlug, '/')) {
$segments = explode('/', $trimmedSlug);
$lastSegment = end($segments);
if (is_numeric($lastSegment)) {
$mId = $lastSegment;
}
}
// 3. Determine if it's a category slug
$isCategorySlug = !$trimmedSlug || !str_contains($trimmedSlug, '/') || in_array($trimmedSlug, ['vimarsanam', 'review']);
$mTitle = $movie['flim_name'] ?? $movie['flimname'] ?? $movie['title'] ?? '';
$mImage = $movie['image'] ?? $movie['image_url'] ?? $movie['timage'] ?? '';
$mYear = $movie['year'] ?? $movie['created_date'] ?? $movie['date'] ?? '';
$mRating = $movie['starrating'] ?? $movie['rating'] ?? '';
// 4. Build the final URL
if ($mSlugRaw && !$isCategorySlug) {
$mDetailUrl = url(ltrim($mSlugRaw, '/'));
} elseif ($mId) {
$tSlug = Str::slug($mTitle) ?: 'vimarsanam';
$mDetailUrl = url("/review/{$tSlug}/{$mId}");
} else {
$mDetailUrl = url('/review');
}
$cardStyle = "min-width:210px; height:400px; transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); cursor:pointer; position:relative;";
if (!$loop->first) { $cardStyle .= " margin-left: -100px;"; }
@endphp
Published on {{ $mYear }}
{{ $mTitle }}
@if(!empty($mRating) && $mRating != '0')
{{ floatval($mRating) }}/5
@endif
@endforeach
@endif
{{-- ======= மேலும் விமர்சனங்கள் — slug from API ======= --}}
@php $finalMoreReviews = !empty($melumreview) ? $melumreview : $relatednews; @endphp
@if(!empty($finalMoreReviews))
மேலும் விமர்சனங்கள்
@foreach(array_slice($finalMoreReviews, 0, 3) as $more)
@php
// 1. Try all possible ID keys
$mId = $more['fid'] ?? $more['id'] ?? $more['uid'] ?? $more['newsid'] ?? $more['film_id'] ?? $more['news_id'] ?? $more['mid'] ?? $more['movie_id'] ?? $more['f_id'] ?? '';
$mSlugRaw = $more['slug'] ?? '';
$trimmedSlug = trim($mSlugRaw, '/');
// 2. If ID is still empty, try to extract it from the end of the slug
if (!$mId && $trimmedSlug && str_contains($trimmedSlug, '/')) {
$segments = explode('/', $trimmedSlug);
$lastSegment = end($segments);
if (is_numeric($lastSegment)) {
$mId = $lastSegment;
}
}
// 3. Determine if it's a category slug
$isCategorySlug = !$trimmedSlug || !str_contains($trimmedSlug, '/') || in_array($trimmedSlug, ['vimarsanam', 'review']);
$mTitle = $more['title'] ?? $more['flim_name'] ?? $more['flimname'] ?? '';
$mImage = $more['image'] ?? $more['largeimage'] ?? $more['image_url'] ?? $more['timage'] ?? '';
$mDesc = $more['description'] ?? '';
$mDate = $more['date'] ?? $more['created_date'] ?? '';
// 4. Build the final URL
if ($mSlugRaw && !$isCategorySlug) {
$mDetailUrl = url(ltrim($mSlugRaw, '/'));
} elseif ($mId) {
$tSlug =Str::slug($mTitle) ?: 'review';
$mDetailUrl = url("/review/{$tSlug}/{$mId}");
} else {
$mDetailUrl = url('/review');
}
$mDisplayDate = $mDate;
if (!empty($mDate)) {
try {
$dt = \Carbon\Carbon::parse($mDate);
$mDisplayDate = $dt->format('F j, Y');
} catch (\Exception $e) { $mDisplayDate = $mDate; }
}
@endphp
@endsection
@section('js')
{{-- Slick is already included in commontemp --}}
@endsection
@extends('layouts.commontemp')
@section('title', ($movieData['flimname'] ?? 'விமர்சனம்') . ' - விமர்சனம் | Tamil Cinema News')
@section('body_class', 'page-template page-template-template-home1 page-template-template-home1-php page page-id-432 custom-background wp-embed-responsive theme-zox-news woocommerce-js')
@section('seo')
@endsection
@section('css')
@endsection
@section('content')
{{-- ======= REUSABLE SLUG HELPER ======= --}}
{{-- Usage: pass any article/review array to get its URL from slug --}}
{{-- $item['slug'] from API is like "/movie-review/rathnam/3436" --}}
{{-- We strip the leading slash and pass to url() helper --}}
@include('layouts.cini-detail-advt970x90')
{{ $movieData['flimname'] ?? '' }} - விமர்சனம்
தயாரிப்பு - {{ $movieData['pname'] ?? '' }} | இயக்கம் -
{{ $movieData['directorname'] ?? '' }}
{{-- ======= வந்த படங்கள் SLIDER — slug from API ======= --}}
@if(!empty($directorMovies) && count($directorMovies) > 1)
வந்த படங்கள்
@foreach($directorMovies as $movie)
@php
// 1. Try all possible ID keys
$mId = $movie['fid'] ?? $movie['id'] ?? $movie['uid'] ?? $movie['newsid'] ?? $movie['film_id'] ?? $movie['news_id'] ?? $movie['mid'] ?? $movie['movie_id'] ?? $movie['f_id'] ?? '';
$mSlugRaw = $movie['slug'] ?? '';
$trimmedSlug = trim($mSlugRaw, '/');
// 2. If ID is still empty, try to extract it from the end of the slug
if (!$mId && $trimmedSlug && str_contains($trimmedSlug, '/')) {
$segments = explode('/', $trimmedSlug);
$lastSegment = end($segments);
if (is_numeric($lastSegment)) {
$mId = $lastSegment;
}
}
// 3. Determine if it's a category slug
$isCategorySlug = !$trimmedSlug || !str_contains($trimmedSlug, '/') || in_array($trimmedSlug, ['vimarsanam', 'review']);
$mTitle = $movie['flim_name'] ?? $movie['flimname'] ?? $movie['title'] ?? '';
$mImage = $movie['image'] ?? $movie['image_url'] ?? $movie['timage'] ?? '';
$mYear = $movie['year'] ?? $movie['created_date'] ?? $movie['date'] ?? '';
$mRating = $movie['starrating'] ?? $movie['rating'] ?? '';
// 4. Build the final URL
if ($mSlugRaw && !$isCategorySlug) {
$mDetailUrl = url(ltrim($mSlugRaw, '/'));
} elseif ($mId) {
$tSlug = Str::slug($mTitle) ?: 'vimarsanam';
$mDetailUrl = url("/review/{$tSlug}/{$mId}");
} else {
$mDetailUrl = url('/review');
}
$cardStyle = "min-width:210px; height:400px; transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); cursor:pointer; position:relative;";
if (!$loop->first) { $cardStyle .= " margin-left: -100px;"; }
@endphp
Published on {{ $mYear }}
{{ $mTitle }}
@if(!empty($mRating) && $mRating != '0')
{{ floatval($mRating) }}/5
@endif
@endforeach
@endif
{{-- ======= மேலும் விமர்சனங்கள் — slug from API ======= --}}
@php $finalMoreReviews = !empty($melumreview) ? $melumreview : $relatednews; @endphp
@if(!empty($finalMoreReviews))
மேலும் விமர்சனங்கள்
@foreach(array_slice($finalMoreReviews, 0, 3) as $more)
@php
// 1. Try all possible ID keys
$mId = $more['fid'] ?? $more['id'] ?? $more['uid'] ?? $more['newsid'] ?? $more['film_id'] ?? $more['news_id'] ?? $more['mid'] ?? $more['movie_id'] ?? $more['f_id'] ?? '';
$mSlugRaw = $more['slug'] ?? '';
$trimmedSlug = trim($mSlugRaw, '/');
// 2. If ID is still empty, try to extract it from the end of the slug
if (!$mId && $trimmedSlug && str_contains($trimmedSlug, '/')) {
$segments = explode('/', $trimmedSlug);
$lastSegment = end($segments);
if (is_numeric($lastSegment)) {
$mId = $lastSegment;
}
}
// 3. Determine if it's a category slug
$isCategorySlug = !$trimmedSlug || !str_contains($trimmedSlug, '/') || in_array($trimmedSlug, ['vimarsanam', 'review']);
$mTitle = $more['title'] ?? $more['flim_name'] ?? $more['flimname'] ?? '';
$mImage = $more['image'] ?? $more['largeimage'] ?? $more['image_url'] ?? $more['timage'] ?? '';
$mDesc = $more['description'] ?? '';
$mDate = $more['date'] ?? $more['created_date'] ?? '';
// 4. Build the final URL
if ($mSlugRaw && !$isCategorySlug) {
$mDetailUrl = url(ltrim($mSlugRaw, '/'));
} elseif ($mId) {
$tSlug =Str::slug($mTitle) ?: 'review';
$mDetailUrl = url("/review/{$tSlug}/{$mId}");
} else {
$mDetailUrl = url('/review');
}
$mDisplayDate = $mDate;
if (!empty($mDate)) {
try {
$dt = \Carbon\Carbon::parse($mDate);
$mDisplayDate = $dt->format('F j, Y');
} catch (\Exception $e) { $mDisplayDate = $mDate; }
}
@endphp
@endsection
@section('js')
{{-- Slick is already included in commontemp --}}
@endsection
@extends('layouts.commontemp')
@section('title', ($movieData['flimname'] ?? 'விமர்சனம்') . ' - விமர்சனம் | Tamil Cinema News')
@section('body_class', 'page-template page-template-template-home1 page-template-template-home1-php page page-id-432 custom-background wp-embed-responsive theme-zox-news woocommerce-js')
@section('seo')
@endsection
@section('css')
@endsection
@section('content')
{{-- ======= REUSABLE SLUG HELPER ======= --}}
{{-- Usage: pass any article/review array to get its URL from slug --}}
{{-- $item['slug'] from API is like "/movie-review/rathnam/3436" --}}
{{-- We strip the leading slash and pass to url() helper --}}
@include('layouts.cini-detail-advt970x90')
{{ $movieData['flimname'] ?? '' }} - விமர்சனம்
தயாரிப்பு - {{ $movieData['pname'] ?? '' }} | இயக்கம் -
{{ $movieData['directorname'] ?? '' }}
{{-- ======= வந்த படங்கள் SLIDER — slug from API ======= --}}
@if(!empty($directorMovies) && count($directorMovies) > 1)
வந்த படங்கள்
@foreach($directorMovies as $movie)
@php
// 1. Try all possible ID keys
$mId = $movie['fid'] ?? $movie['id'] ?? $movie['uid'] ?? $movie['newsid'] ?? $movie['film_id'] ?? $movie['news_id'] ?? $movie['mid'] ?? $movie['movie_id'] ?? $movie['f_id'] ?? '';
$mSlugRaw = $movie['slug'] ?? '';
$trimmedSlug = trim($mSlugRaw, '/');
// 2. If ID is still empty, try to extract it from the end of the slug
if (!$mId && $trimmedSlug && str_contains($trimmedSlug, '/')) {
$segments = explode('/', $trimmedSlug);
$lastSegment = end($segments);
if (is_numeric($lastSegment)) {
$mId = $lastSegment;
}
}
// 3. Determine if it's a category slug
$isCategorySlug = !$trimmedSlug || !str_contains($trimmedSlug, '/') || in_array($trimmedSlug, ['vimarsanam', 'review']);
$mTitle = $movie['flim_name'] ?? $movie['flimname'] ?? $movie['title'] ?? '';
$mImage = $movie['image'] ?? $movie['image_url'] ?? $movie['timage'] ?? '';
$mYear = $movie['year'] ?? $movie['created_date'] ?? $movie['date'] ?? '';
$mRating = $movie['starrating'] ?? $movie['rating'] ?? '';
// 4. Build the final URL
if ($mSlugRaw && !$isCategorySlug) {
$mDetailUrl = url(ltrim($mSlugRaw, '/'));
} elseif ($mId) {
$tSlug = Str::slug($mTitle) ?: 'vimarsanam';
$mDetailUrl = url("/review/{$tSlug}/{$mId}");
} else {
$mDetailUrl = url('/review');
}
$cardStyle = "min-width:210px; height:400px; transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); cursor:pointer; position:relative;";
if (!$loop->first) { $cardStyle .= " margin-left: -100px;"; }
@endphp
Published on {{ $mYear }}
{{ $mTitle }}
@if(!empty($mRating) && $mRating != '0')
{{ floatval($mRating) }}/5
@endif
@endforeach
@endif
{{-- ======= மேலும் விமர்சனங்கள் — slug from API ======= --}}
@php $finalMoreReviews = !empty($melumreview) ? $melumreview : $relatednews; @endphp
@if(!empty($finalMoreReviews))
மேலும் விமர்சனங்கள்
@foreach(array_slice($finalMoreReviews, 0, 3) as $more)
@php
// 1. Try all possible ID keys
$mId = $more['fid'] ?? $more['id'] ?? $more['uid'] ?? $more['newsid'] ?? $more['film_id'] ?? $more['news_id'] ?? $more['mid'] ?? $more['movie_id'] ?? $more['f_id'] ?? '';
$mSlugRaw = $more['slug'] ?? '';
$trimmedSlug = trim($mSlugRaw, '/');
// 2. If ID is still empty, try to extract it from the end of the slug
if (!$mId && $trimmedSlug && str_contains($trimmedSlug, '/')) {
$segments = explode('/', $trimmedSlug);
$lastSegment = end($segments);
if (is_numeric($lastSegment)) {
$mId = $lastSegment;
}
}
// 3. Determine if it's a category slug
$isCategorySlug = !$trimmedSlug || !str_contains($trimmedSlug, '/') || in_array($trimmedSlug, ['vimarsanam', 'review']);
$mTitle = $more['title'] ?? $more['flim_name'] ?? $more['flimname'] ?? '';
$mImage = $more['image'] ?? $more['largeimage'] ?? $more['image_url'] ?? $more['timage'] ?? '';
$mDesc = $more['description'] ?? '';
$mDate = $more['date'] ?? $more['created_date'] ?? '';
// 4. Build the final URL
if ($mSlugRaw && !$isCategorySlug) {
$mDetailUrl = url(ltrim($mSlugRaw, '/'));
} elseif ($mId) {
$tSlug =Str::slug($mTitle) ?: 'review';
$mDetailUrl = url("/review/{$tSlug}/{$mId}");
} else {
$mDetailUrl = url('/review');
}
$mDisplayDate = $mDate;
if (!empty($mDate)) {
try {
$dt = \Carbon\Carbon::parse($mDate);
$mDisplayDate = $dt->format('F j, Y');
} catch (\Exception $e) { $mDisplayDate = $mDate; }
}
@endphp
@endsection
@section('js')
{{-- Slick is already included in commontemp --}}
@endsection
@extends('layouts.commontemp')
@section('title', ($movieData['flimname'] ?? 'விமர்சனம்') . ' - விமர்சனம் | Tamil Cinema News')
@section('body_class', 'page-template page-template-template-home1 page-template-template-home1-php page page-id-432 custom-background wp-embed-responsive theme-zox-news woocommerce-js')
@section('seo')
@endsection
@section('css')
@endsection
@section('content')
{{-- ======= REUSABLE SLUG HELPER ======= --}}
{{-- Usage: pass any article/review array to get its URL from slug --}}
{{-- $item['slug'] from API is like "/movie-review/rathnam/3436" --}}
{{-- We strip the leading slash and pass to url() helper --}}
@include('layouts.cini-detail-advt970x90')
{{ $movieData['flimname'] ?? '' }} - விமர்சனம்
தயாரிப்பு - {{ $movieData['pname'] ?? '' }} | இயக்கம் -
{{ $movieData['directorname'] ?? '' }}
{{-- ======= வந்த படங்கள் SLIDER — slug from API ======= --}}
@if(!empty($directorMovies) && count($directorMovies) > 1)
வந்த படங்கள்
@foreach($directorMovies as $movie)
@php
// 1. Try all possible ID keys
$mId = $movie['fid'] ?? $movie['id'] ?? $movie['uid'] ?? $movie['newsid'] ?? $movie['film_id'] ?? $movie['news_id'] ?? $movie['mid'] ?? $movie['movie_id'] ?? $movie['f_id'] ?? '';
$mSlugRaw = $movie['slug'] ?? '';
$trimmedSlug = trim($mSlugRaw, '/');
// 2. If ID is still empty, try to extract it from the end of the slug
if (!$mId && $trimmedSlug && str_contains($trimmedSlug, '/')) {
$segments = explode('/', $trimmedSlug);
$lastSegment = end($segments);
if (is_numeric($lastSegment)) {
$mId = $lastSegment;
}
}
// 3. Determine if it's a category slug
$isCategorySlug = !$trimmedSlug || !str_contains($trimmedSlug, '/') || in_array($trimmedSlug, ['vimarsanam', 'review']);
$mTitle = $movie['flim_name'] ?? $movie['flimname'] ?? $movie['title'] ?? '';
$mImage = $movie['image'] ?? $movie['image_url'] ?? $movie['timage'] ?? '';
$mYear = $movie['year'] ?? $movie['created_date'] ?? $movie['date'] ?? '';
$mRating = $movie['starrating'] ?? $movie['rating'] ?? '';
// 4. Build the final URL
if ($mSlugRaw && !$isCategorySlug) {
$mDetailUrl = url(ltrim($mSlugRaw, '/'));
} elseif ($mId) {
$tSlug = Str::slug($mTitle) ?: 'vimarsanam';
$mDetailUrl = url("/review/{$tSlug}/{$mId}");
} else {
$mDetailUrl = url('/review');
}
$cardStyle = "min-width:210px; height:400px; transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); cursor:pointer; position:relative;";
if (!$loop->first) { $cardStyle .= " margin-left: -100px;"; }
@endphp
Published on {{ $mYear }}
{{ $mTitle }}
@if(!empty($mRating) && $mRating != '0')
{{ floatval($mRating) }}/5
@endif
@endforeach
@endif
{{-- ======= மேலும் விமர்சனங்கள் — slug from API ======= --}}
@php $finalMoreReviews = !empty($melumreview) ? $melumreview : $relatednews; @endphp
@if(!empty($finalMoreReviews))
மேலும் விமர்சனங்கள்
@foreach(array_slice($finalMoreReviews, 0, 3) as $more)
@php
// 1. Try all possible ID keys
$mId = $more['fid'] ?? $more['id'] ?? $more['uid'] ?? $more['newsid'] ?? $more['film_id'] ?? $more['news_id'] ?? $more['mid'] ?? $more['movie_id'] ?? $more['f_id'] ?? '';
$mSlugRaw = $more['slug'] ?? '';
$trimmedSlug = trim($mSlugRaw, '/');
// 2. If ID is still empty, try to extract it from the end of the slug
if (!$mId && $trimmedSlug && str_contains($trimmedSlug, '/')) {
$segments = explode('/', $trimmedSlug);
$lastSegment = end($segments);
if (is_numeric($lastSegment)) {
$mId = $lastSegment;
}
}
// 3. Determine if it's a category slug
$isCategorySlug = !$trimmedSlug || !str_contains($trimmedSlug, '/') || in_array($trimmedSlug, ['vimarsanam', 'review']);
$mTitle = $more['title'] ?? $more['flim_name'] ?? $more['flimname'] ?? '';
$mImage = $more['image'] ?? $more['largeimage'] ?? $more['image_url'] ?? $more['timage'] ?? '';
$mDesc = $more['description'] ?? '';
$mDate = $more['date'] ?? $more['created_date'] ?? '';
// 4. Build the final URL
if ($mSlugRaw && !$isCategorySlug) {
$mDetailUrl = url(ltrim($mSlugRaw, '/'));
} elseif ($mId) {
$tSlug =Str::slug($mTitle) ?: 'review';
$mDetailUrl = url("/review/{$tSlug}/{$mId}");
} else {
$mDetailUrl = url('/review');
}
$mDisplayDate = $mDate;
if (!empty($mDate)) {
try {
$dt = \Carbon\Carbon::parse($mDate);
$mDisplayDate = $dt->format('F j, Y');
} catch (\Exception $e) { $mDisplayDate = $mDate; }
}
@endphp
@endsection
@section('js')
{{-- Slick is already included in commontemp --}}
@endsection
@extends('layouts.commontemp')
@section('title', ($movieData['flimname'] ?? 'விமர்சனம்') . ' - விமர்சனம் | Tamil Cinema News')
@section('body_class', 'page-template page-template-template-home1 page-template-template-home1-php page page-id-432 custom-background wp-embed-responsive theme-zox-news woocommerce-js')
@section('seo')
@endsection
@section('css')
@endsection
@section('content')
{{-- ======= REUSABLE SLUG HELPER ======= --}}
{{-- Usage: pass any article/review array to get its URL from slug --}}
{{-- $item['slug'] from API is like "/movie-review/rathnam/3436" --}}
{{-- We strip the leading slash and pass to url() helper --}}
@include('layouts.cini-detail-advt970x90')
{{ $movieData['flimname'] ?? '' }} - விமர்சனம்
தயாரிப்பு - {{ $movieData['pname'] ?? '' }} | இயக்கம் -
{{ $movieData['directorname'] ?? '' }}
{{-- ======= வந்த படங்கள் SLIDER — slug from API ======= --}}
@if(!empty($directorMovies) && count($directorMovies) > 1)
வந்த படங்கள்
@foreach($directorMovies as $movie)
@php
// 1. Try all possible ID keys
$mId = $movie['fid'] ?? $movie['id'] ?? $movie['uid'] ?? $movie['newsid'] ?? $movie['film_id'] ?? $movie['news_id'] ?? $movie['mid'] ?? $movie['movie_id'] ?? $movie['f_id'] ?? '';
$mSlugRaw = $movie['slug'] ?? '';
$trimmedSlug = trim($mSlugRaw, '/');
// 2. If ID is still empty, try to extract it from the end of the slug
if (!$mId && $trimmedSlug && str_contains($trimmedSlug, '/')) {
$segments = explode('/', $trimmedSlug);
$lastSegment = end($segments);
if (is_numeric($lastSegment)) {
$mId = $lastSegment;
}
}
// 3. Determine if it's a category slug
$isCategorySlug = !$trimmedSlug || !str_contains($trimmedSlug, '/') || in_array($trimmedSlug, ['vimarsanam', 'review']);
$mTitle = $movie['flim_name'] ?? $movie['flimname'] ?? $movie['title'] ?? '';
$mImage = $movie['image'] ?? $movie['image_url'] ?? $movie['timage'] ?? '';
$mYear = $movie['year'] ?? $movie['created_date'] ?? $movie['date'] ?? '';
$mRating = $movie['starrating'] ?? $movie['rating'] ?? '';
// 4. Build the final URL
if ($mSlugRaw && !$isCategorySlug) {
$mDetailUrl = url(ltrim($mSlugRaw, '/'));
} elseif ($mId) {
$tSlug = Str::slug($mTitle) ?: 'vimarsanam';
$mDetailUrl = url("/review/{$tSlug}/{$mId}");
} else {
$mDetailUrl = url('/review');
}
$cardStyle = "min-width:210px; height:400px; transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); cursor:pointer; position:relative;";
if (!$loop->first) { $cardStyle .= " margin-left: -100px;"; }
@endphp
Published on {{ $mYear }}
{{ $mTitle }}
@if(!empty($mRating) && $mRating != '0')
{{ floatval($mRating) }}/5
@endif
@endforeach
@endif
{{-- ======= மேலும் விமர்சனங்கள் — slug from API ======= --}}
@php $finalMoreReviews = !empty($melumreview) ? $melumreview : $relatednews; @endphp
@if(!empty($finalMoreReviews))
மேலும் விமர்சனங்கள்
@foreach(array_slice($finalMoreReviews, 0, 3) as $more)
@php
// 1. Try all possible ID keys
$mId = $more['fid'] ?? $more['id'] ?? $more['uid'] ?? $more['newsid'] ?? $more['film_id'] ?? $more['news_id'] ?? $more['mid'] ?? $more['movie_id'] ?? $more['f_id'] ?? '';
$mSlugRaw = $more['slug'] ?? '';
$trimmedSlug = trim($mSlugRaw, '/');
// 2. If ID is still empty, try to extract it from the end of the slug
if (!$mId && $trimmedSlug && str_contains($trimmedSlug, '/')) {
$segments = explode('/', $trimmedSlug);
$lastSegment = end($segments);
if (is_numeric($lastSegment)) {
$mId = $lastSegment;
}
}
// 3. Determine if it's a category slug
$isCategorySlug = !$trimmedSlug || !str_contains($trimmedSlug, '/') || in_array($trimmedSlug, ['vimarsanam', 'review']);
$mTitle = $more['title'] ?? $more['flim_name'] ?? $more['flimname'] ?? '';
$mImage = $more['image'] ?? $more['largeimage'] ?? $more['image_url'] ?? $more['timage'] ?? '';
$mDesc = $more['description'] ?? '';
$mDate = $more['date'] ?? $more['created_date'] ?? '';
// 4. Build the final URL
if ($mSlugRaw && !$isCategorySlug) {
$mDetailUrl = url(ltrim($mSlugRaw, '/'));
} elseif ($mId) {
$tSlug =Str::slug($mTitle) ?: 'review';
$mDetailUrl = url("/review/{$tSlug}/{$mId}");
} else {
$mDetailUrl = url('/review');
}
$mDisplayDate = $mDate;
if (!empty($mDate)) {
try {
$dt = \Carbon\Carbon::parse($mDate);
$mDisplayDate = $dt->format('F j, Y');
} catch (\Exception $e) { $mDisplayDate = $mDate; }
}
@endphp
@endsection
@section('js')
{{-- Slick is already included in commontemp --}}
@endsection
@extends('layouts.commontemp')
@section('title', ($movieData['flimname'] ?? 'விமர்சனம்') . ' - விமர்சனம் | Tamil Cinema News')
@section('body_class', 'page-template page-template-template-home1 page-template-template-home1-php page page-id-432 custom-background wp-embed-responsive theme-zox-news woocommerce-js')
@section('seo')
@endsection
@section('css')
@endsection
@section('content')
{{-- ======= REUSABLE SLUG HELPER ======= --}}
{{-- Usage: pass any article/review array to get its URL from slug --}}
{{-- $item['slug'] from API is like "/movie-review/rathnam/3436" --}}
{{-- We strip the leading slash and pass to url() helper --}}
@include('layouts.cini-detail-advt970x90')
{{ $movieData['flimname'] ?? '' }} - விமர்சனம்
தயாரிப்பு - {{ $movieData['pname'] ?? '' }} | இயக்கம் -
{{ $movieData['directorname'] ?? '' }}
{{-- ======= வந்த படங்கள் SLIDER — slug from API ======= --}}
@if(!empty($directorMovies) && count($directorMovies) > 1)
வந்த படங்கள்
@foreach($directorMovies as $movie)
@php
// 1. Try all possible ID keys
$mId = $movie['fid'] ?? $movie['id'] ?? $movie['uid'] ?? $movie['newsid'] ?? $movie['film_id'] ?? $movie['news_id'] ?? $movie['mid'] ?? $movie['movie_id'] ?? $movie['f_id'] ?? '';
$mSlugRaw = $movie['slug'] ?? '';
$trimmedSlug = trim($mSlugRaw, '/');
// 2. If ID is still empty, try to extract it from the end of the slug
if (!$mId && $trimmedSlug && str_contains($trimmedSlug, '/')) {
$segments = explode('/', $trimmedSlug);
$lastSegment = end($segments);
if (is_numeric($lastSegment)) {
$mId = $lastSegment;
}
}
// 3. Determine if it's a category slug
$isCategorySlug = !$trimmedSlug || !str_contains($trimmedSlug, '/') || in_array($trimmedSlug, ['vimarsanam', 'review']);
$mTitle = $movie['flim_name'] ?? $movie['flimname'] ?? $movie['title'] ?? '';
$mImage = $movie['image'] ?? $movie['image_url'] ?? $movie['timage'] ?? '';
$mYear = $movie['year'] ?? $movie['created_date'] ?? $movie['date'] ?? '';
$mRating = $movie['starrating'] ?? $movie['rating'] ?? '';
// 4. Build the final URL
if ($mSlugRaw && !$isCategorySlug) {
$mDetailUrl = url(ltrim($mSlugRaw, '/'));
} elseif ($mId) {
$tSlug = Str::slug($mTitle) ?: 'vimarsanam';
$mDetailUrl = url("/review/{$tSlug}/{$mId}");
} else {
$mDetailUrl = url('/review');
}
$cardStyle = "min-width:210px; height:400px; transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); cursor:pointer; position:relative;";
if (!$loop->first) { $cardStyle .= " margin-left: -100px;"; }
@endphp
Published on {{ $mYear }}
{{ $mTitle }}
@if(!empty($mRating) && $mRating != '0')
{{ floatval($mRating) }}/5
@endif
@endforeach
@endif
{{-- ======= மேலும் விமர்சனங்கள் — slug from API ======= --}}
@php $finalMoreReviews = !empty($melumreview) ? $melumreview : $relatednews; @endphp
@if(!empty($finalMoreReviews))
மேலும் விமர்சனங்கள்
@foreach(array_slice($finalMoreReviews, 0, 3) as $more)
@php
// 1. Try all possible ID keys
$mId = $more['fid'] ?? $more['id'] ?? $more['uid'] ?? $more['newsid'] ?? $more['film_id'] ?? $more['news_id'] ?? $more['mid'] ?? $more['movie_id'] ?? $more['f_id'] ?? '';
$mSlugRaw = $more['slug'] ?? '';
$trimmedSlug = trim($mSlugRaw, '/');
// 2. If ID is still empty, try to extract it from the end of the slug
if (!$mId && $trimmedSlug && str_contains($trimmedSlug, '/')) {
$segments = explode('/', $trimmedSlug);
$lastSegment = end($segments);
if (is_numeric($lastSegment)) {
$mId = $lastSegment;
}
}
// 3. Determine if it's a category slug
$isCategorySlug = !$trimmedSlug || !str_contains($trimmedSlug, '/') || in_array($trimmedSlug, ['vimarsanam', 'review']);
$mTitle = $more['title'] ?? $more['flim_name'] ?? $more['flimname'] ?? '';
$mImage = $more['image'] ?? $more['largeimage'] ?? $more['image_url'] ?? $more['timage'] ?? '';
$mDesc = $more['description'] ?? '';
$mDate = $more['date'] ?? $more['created_date'] ?? '';
// 4. Build the final URL
if ($mSlugRaw && !$isCategorySlug) {
$mDetailUrl = url(ltrim($mSlugRaw, '/'));
} elseif ($mId) {
$tSlug =Str::slug($mTitle) ?: 'review';
$mDetailUrl = url("/review/{$tSlug}/{$mId}");
} else {
$mDetailUrl = url('/review');
}
$mDisplayDate = $mDate;
if (!empty($mDate)) {
try {
$dt = \Carbon\Carbon::parse($mDate);
$mDisplayDate = $dt->format('F j, Y');
} catch (\Exception $e) { $mDisplayDate = $mDate; }
}
@endphp