25 lines
508 B
PHP
25 lines
508 B
PHP
<?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();
|
||
|
|
}
|
||
|
|
}
|