progress
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user