From 6d042d8a75742b74f9d4caa67d295894d5841d5b Mon Sep 17 00:00:00 2001
From: Constantin Plaiasu
Date: Mon, 26 Aug 2024 21:04:04 +0300
Subject: [PATCH 1/3] raw movie tpl copy
---
resources/views/show.blade.php | 197 +++++++++++++++++++++++++++++----
1 file changed, 177 insertions(+), 20 deletions(-)
diff --git a/resources/views/show.blade.php b/resources/views/show.blade.php
index b48906d..f124fd9 100644
--- a/resources/views/show.blade.php
+++ b/resources/views/show.blade.php
@@ -1,18 +1,184 @@
- @extends('layouts.layout')
- @section('schema')
- @foreach($meta['schema'] as $value)
-
- @endforeach
- @endsection
-{{-- @section('head')
+@extends('layouts.layout')
+@section('schema')
+@foreach($meta['schema'] as $value)
+
+@endforeach
+@endsection
+@section('head')
+
+
-@endsection --}}
+@endsection
{{-- @section('head') --}}
-{{-- {!! getMovieMarkupData($movie) !!} --}}
+{{-- {!! getMovieMarkupData($show) !!} --}}
{{-- @endsection --}}
+@section('app')
+
+
+
+
+
+
{{ str($show['name'])->apa() }}
+ @if($show['tagline'])
+
"{{ $show['tagline'] }}"
+ @endif
+
+ - Home
+ - Movies
+ - {{$show['name']}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Watch {{ str($show['name'])->apa() }}
+
+
Type : Movie
+ Category: {{ $show['genres'][0]['name'] }}
+
+
+
+
+
+
+
+ {{$show['vote_average']}}
+
+
+
+
+ {{$show['vote_count']}} views
+
+
+
+
+
+
+
+ - Share :
+
+ @if (isset($show['share']) && is_array($show['share']))
+ @foreach ($show['share'] as $share)
+
+ -
+
+
+ @endforeach
+ @endif
+
+
+
+
+
+
+
+
+
+
+
+
+
Details
+
{{ $show['overview'] }}
+
+
+ -
+ Genres: 
+
+ @foreach($show['genres'] as $genre)
+ {{ $genre['name'] }}@if(!$loop->last), @endif
+ @endforeach
+
+
+ -
+ Language: 
+
+ @foreach($show['languages'] as $language)
+ {{ $language }}@if(!$loop->last), @endif
+ @endforeach
+
+
+
+
+
+
Cast & Crew
+
+ -
+ Cast:
+
+ @foreach($show['cast'] as $actor)
+ {{ $actor['name'] }}@if(!$loop->last), @endif
+ @endforeach
+
+ -
+ Director:
+
+ @foreach($show['crew']['directors'] as $actor)
+ {{ $actor['name'] }}@if(!$loop->last), @endif
+ @endforeach
+
+
+ @unless (empty($show['crew']['producers']))
+
+ -
+ Producer:
+
+ @foreach($show['crew']['producers'] as $actor)
+ {{ $actor['name'] }}@if(!$loop->last), @endif
+ @endforeach
+
+ @endunless
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @foreach ($show['similar'] as $item)
+ @include('components.title_card', ['data_text' => ucfirst($item['type'])])
+ @endforeach
+
+
+
+
+
+ @endsection
+ @section('footer')
+ @vite(['resources/js/watch.js'])
+
+ @endsection
+
@section('content')
- Creators:
+ {{--
Creators:
@foreach($show['crew'] as $actor)
{{ $actor['name'] }}@if(!$loop->last), @endif
@endforeach
-
+ --}}
@isset($show['genres'])
Genres:
@foreach($show['genres'] as $genre)
- {{ $genre['name'] }}@if(!$loop->last), @endif
+ {{ $genre['name'] }}@if(!$loop->last), @endif
@endforeach
@endisset
diff --git a/routes/web.php b/routes/web.php
index 22e769b..ddd9aa2 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -33,4 +33,5 @@
Route::get('/movie/{id}/{slug}', [MovieController::class, 'index'])->name('movie');
Route::get('/series/{id}/{slug}', [ShowController::class, 'index'])->name('show');
+Route::get('/series/{id}/{slug}/season/{season}', [ShowController::class, 'season'])->name('show.season');
Route::get('/search', [HomeController::class, 'search'])->name('search');
From 44105afff4ed0e9c18bd13e41414341297116fea Mon Sep 17 00:00:00 2001
From: Constantin Plaiasu
Date: Mon, 26 Aug 2024 22:11:33 +0300
Subject: [PATCH 3/3] add share data
---
app/Supports/Traits/CleanItems.php | 1 +
resources/views/show.blade.php | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/Supports/Traits/CleanItems.php b/app/Supports/Traits/CleanItems.php
index db1cffc..9f1ccbb 100644
--- a/app/Supports/Traits/CleanItems.php
+++ b/app/Supports/Traits/CleanItems.php
@@ -117,6 +117,7 @@ public function formatTmdbShow($data):array
$show['similar'] = $this->formatTmdbResponse($data['recommendations'], false, [], 8)['data'] ?? [];
$show['keywords'] = $data['keywords']['results'] ?? [];
$show['languages'] = self::getSpokenLanguages($data['spoken_languages']);
+ $show['share'] = self::getShareLinks(route('movie', ['id' => $show['id'], 'slug' => $show['slug']]), $show['title'], Str::limit($show['overview'], 100), $show['poster']);
// dd($show);
return $show;
diff --git a/resources/views/show.blade.php b/resources/views/show.blade.php
index 14a69a4..7fc460d 100644
--- a/resources/views/show.blade.php
+++ b/resources/views/show.blade.php
@@ -98,7 +98,7 @@
Genres: 
@foreach($show['genres'] as $genre)
- {{ $genre['name'] }}@if(!$loop->last), @endif
+ {{ $genre['name'] }}@if(!$loop->last), @endif
@endforeach