From 44105afff4ed0e9c18bd13e41414341297116fea Mon Sep 17 00:00:00 2001 From: Constantin Plaiasu Date: Mon, 26 Aug 2024 22:11:33 +0300 Subject: [PATCH] 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