Edit File: SeasonShow.php
<?php namespace App\Livewire\Show; use App\Models\Season; use Livewire\Attributes\Layout; use Livewire\Component; class SeasonShow extends Component { public $animes; public $season; public $recommendation_seasons; public function mount($slug) { $this->season = Season::with("animes")->where("slug", $slug)->first(); $this->recommendation_seasons = Season::with("animes")->where("order", $this->season->order + 1)->orWhere("order", $this->season->order - 1)->get(); $this->animes = $this->season->animes; } #[Layout("layouts.guest")] public function render() { return view('livewire.show.season-show'); } }
Back