add share data

This commit is contained in:
Constantin Plaiasu 2024-08-26 22:11:33 +03:00
parent 4831861208
commit 44105afff4
2 changed files with 2 additions and 1 deletions

View file

@ -117,6 +117,7 @@ public function formatTmdbShow($data):array
$show['similar'] = $this->formatTmdbResponse($data['recommendations'], false, [], 8)['data'] ?? []; $show['similar'] = $this->formatTmdbResponse($data['recommendations'], false, [], 8)['data'] ?? [];
$show['keywords'] = $data['keywords']['results'] ?? []; $show['keywords'] = $data['keywords']['results'] ?? [];
$show['languages'] = self::getSpokenLanguages($data['spoken_languages']); $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); // dd($show);
return $show; return $show;

View file

@ -98,7 +98,7 @@
<span class="caption">Genres:&nbsp</span> <span class="caption">Genres:&nbsp</span>
<span class="value"> <span class="value">
@foreach($show['genres'] as $genre) @foreach($show['genres'] as $genre)
<a href="{{route('movies.genre', $genre['slug'])}}">{{ $genre['name'] }}</a>@if(!$loop->last), @endif <span>{{ $genre['name'] }}</span>@if(!$loop->last), @endif
@endforeach @endforeach
</span> </span>
</li> </li>