diff options
| author | horus | 2020-03-05 16:02:10 +0100 |
|---|---|---|
| committer | horus | 2020-03-05 16:02:10 +0100 |
| commit | 5dda561d73c9a5698386d643d56a142aa4bbdeec (patch) | |
| tree | 55afe2db98d0fa15fc845cc3da3afe6b517bbd3d /app/Calendar.php | |
| parent | 420e44e0fe4623a439e26dfd0526ee5ef606a170 (diff) | |
| download | senpai-5dda561d73c9a5698386d643d56a142aa4bbdeec.tar.gz | |
Committing intermediate state.
Diffstat (limited to 'app/Calendar.php')
| -rw-r--r-- | app/Calendar.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/app/Calendar.php b/app/Calendar.php new file mode 100644 index 0000000..a42e190 --- /dev/null +++ b/app/Calendar.php @@ -0,0 +1,33 @@ +<?php + +namespace App; + +use Illuminate\Database\Eloquent\Model; + +class Calendar extends Model +{ + protected $table = 'calendar'; + + protected $fillable = [ + 'mal_id', + 'user_id', + 'airing_at', + 'duration', + 'episode', + 'episode_watched', + 'episode_complete', + 'score', + 'score_user', + ]; + + public function __construct() { + } + + public function user() { + return $this->belongsTo('App\MALUser', 'user_id', 'id'); + } + + public function anime() { + return $this->belongsTo('App\Anime', 'mal_id', 'mal_id'); + } +} |
