Files
movies/app/Livewire/ShowPage/Recommended.php
T

25 lines
508 B
PHP
Raw Normal View History

2025-02-10 01:58:12 +02:00
<?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();
}
}