This commit is contained in:
2025-02-10 01:58:12 +02:00
parent 25d99e7b72
commit 87bbfc33d3
242 changed files with 38662 additions and 99 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Livewire\ShowPage;
use App\Models\Show;
use App\Models\ShowRecommendation;
use Livewire\Component;
class Recommended extends Component
{
public $show;
public $recommendedShows;
public function render()
{
return view('livewire.show-page.recommended');
}
public function mount()
{
$this->recommendedShows = Show::whereIn('id', ShowRecommendation::where('show_id', $this->show->id)->pluck('recommended_show_id'))
->get();
}
}
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Livewire\ShowPage;
use App\Models\Show;
use App\Models\ShowSimilar;
use Livewire\Component;
class Similar extends Component
{
public $show;
public $similarShows;
public function render()
{
return view('livewire.show-page.similar');
}
public function mount()
{
$this->similarShows = Show::whereIn('id', ShowSimilar::where('show_id', $this->show->id)->pluck('similar_show_id'))
->get();
}
}
+36
View File
@@ -0,0 +1,36 @@
<?php
namespace App\Livewire\ShowPage\Tabs;
use App\Models\Person;
use App\Models\Show;
use Livewire\Component;
class Cast extends Component
{
public $show;
public $peopleByDepartment;
public function render()
{
return view('livewire.show-page.tabs.cast');
}
public function mount()
{
$this->show = Show::with('castList')->where('id', $this->show->id)->first();
$peopleByDepartment = [];
foreach ($this->show->castList as $castMember) {
if (!isset($peopleByDepartment[$castMember->pivot->known_for_department])) {
$peopleByDepartment[$castMember->pivot->known_for_department] = [];
}
$peopleByDepartment[$castMember->pivot->known_for_department][] = [
Person::find($castMember->pivot->person_id),
$castMember->pivot->character,
];
}
$this->peopleByDepartment = $peopleByDepartment;
}
}
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace App\Livewire\ShowPage\Tabs;
use App\Models\Person;
use App\Models\Show;
use Livewire\Component;
class Crew extends Component
{
public $show;
public $peopleByDepartment;
public function render()
{
return view('livewire.show-page.tabs.crew');
}
public function mount()
{
$this->show = Show::with('castList')->where('id', $this->show->id)->first();
$peopleByDepartment = [];
foreach ($this->show->crewList as $castMember) {
if (!isset($peopleByDepartment[$castMember->pivot->department])) {
$peopleByDepartment[$castMember->pivot->department] = [];
}
$peopleByDepartment[$castMember->pivot->department][] = [
Person::find($castMember->pivot->person_id),
$castMember->pivot->job,
];
}
$this->peopleByDepartment = $peopleByDepartment;
}
}
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Livewire\ShowPage\Tabs;
use Livewire\Component;
class Details extends Component
{
public $show;
public function render()
{
return view('livewire.show-page.tabs.details');
}
}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace App\Livewire\ShowPage\Tabs;
use Livewire\Component;
class Releases extends Component
{
public function render()
{
return view('livewire.show-page.tabs.releases');
}
}