'datetime', 'password' => 'hashed', // Other 'name' => 'string', 'email' => 'string', 'locale' => 'string', 'roles' => 'json', 'tag_blacklist' => 'array', // Discord 'discord_id' => 'integer', 'discord_name' => 'string', 'discord_avatar' => 'string', ]; /** * Has Many Playlists. */ public function playlists(): HasMany { return $this->hasMany(Playlist::class); } /** * Has Many Watched Episodes. */ public function watched(): HasMany { return $this->hasMany(Watched::class); } /** * Has Many Watched Episodes. */ public function likes(): int { return DB::table('markable_likes')->where('user_id', $this->id)->count(); } /** * Has Many Comments. */ public function commentCount(): int { return DB::table('comments')->where('commenter_id', $this->id)->count(); } }