belongsTo(Category::class, 'category_uuid', 'uuid'); } /** * @return HasMany */ public function permissions(): HasMany { return $this->hasMany(Permission::class, 'forum_uuid', 'uuid'); } /** * @return BelongsToMany */ public function users(): BelongsToMany { return $this->belongsToMany(User::class, 'forums_has_users', 'forum_uuid', 'user_uuid')->withTimestamps(); } /** * @return HasMany */ public function threads(): HasMany { return $this->hasMany(Thread::class, 'forum_uuid', 'uuid'); } /** * @return BelongsTo */ public function lastpost(): BelongsTo { return $this->belongsTo(Post::class, 'lastpost_uuid', 'uuid'); } /** * @return BelongsToMany */ public function prefixes(): BelongsToMany { return $this->belongsToMany(Prefix::class, 'forums_has_prefixes', 'forum_uuid', 'prefix_uuid'); } }