mal_id = $id; if ( $parse_info ) { $jikan = new Malclient; $this->animeInfo = $jikan->getAnime( (new \Jikan\Request\Anime\AnimeRequest( $this->mal_id )) ); $this->url = $this->animeInfo->GetUrl(); $this->image_url = $this->animeInfo->getImageUrl(); $this->title_eng = $this->animeInfo->getTitleEnglish(); $this->title_rom = $this->animeInfo->getTitle(); $this->title_nat = $this->animeInfo->getTitleJapanese(); $this->title_pref = $this->animeInfo->getTitle(); $this->type = $this->animeInfo->getType(); } } /* public function getStats() { return $this->hasMany('App\AnimeStats'); } */ protected function getInfo() { return $this->animeInfo; } }