diff options
| author | horus | 2020-02-24 02:18:22 +0100 |
|---|---|---|
| committer | horus | 2020-02-24 02:18:22 +0100 |
| commit | b6e4ea17a3a6dce208c30418a7a3a898b83d6938 (patch) | |
| tree | abeb284f5e878e8d4c54d6354841fad53e7939b0 /app/Libraries/AnimeSeason.php | |
| parent | 38843f78bfbd27969df853377696dc8f8c71a921 (diff) | |
| download | senpai-b6e4ea17a3a6dce208c30418a7a3a898b83d6938.tar.gz | |
Stalled...
Diffstat (limited to 'app/Libraries/AnimeSeason.php')
| -rw-r--r-- | app/Libraries/AnimeSeason.php | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/app/Libraries/AnimeSeason.php b/app/Libraries/AnimeSeason.php index a234d5c..acdb34f 100644 --- a/app/Libraries/AnimeSeason.php +++ b/app/Libraries/AnimeSeason.php @@ -3,7 +3,7 @@ namespace App\Libraries; use App\Libraries\AnimeSeason; use App\Anime; -use App\AnimeScore; +use App\AnimeStats; use Carbon\Carbon; @@ -27,16 +27,26 @@ class AnimeSeason { ); $this->year = $season->seasonYear; - $this->name= $season->seasonName; + $this->name = $season->seasonName; $count = 0; foreach($season->anime as $entry) { $count++; - $anime = new AnimeScore( $entry->getMalID() ); - $this->anime[] = $anime; + + $anime = new Anime( $entry->getMalID() ); $anime->save(); - if ( $count == 5) { + $animeStats = new AnimeStats( $entry->getMalID(), $this->year, $this->name ); + $this->anime[] = $animeStats; + + $animeStats->create(); + + /* + echo "<pre>"; + var_dump($anime); + */ + + if ( $count == 1) { return; } } |
