*/ protected $fillable = [ 'title', 'body', 'author_id', 'category_id', 'stickied', 'locked', 'views' ]; /** * The author of this thread. */ public function author() { return $this->belongsTo(User::class, 'author_id'); } /** * The category this thread belongs to. */ public function category() { return $this->belongsTo(ForumCategory::class, 'category_id'); } /** * The replies of this thread. */ public function replies() { return $this->hasMany(ForumReply::class, 'thread_id'); } }