'boolean', 'is_locked' => 'boolean', 'last_activity_at' => 'datetime', ]; /** * Get the category that owns the thread. */ public function category() { return $this->belongsTo(ForumCategory::class, 'category_id'); } /** * Get the user that owns the thread. */ public function user() { return $this->belongsTo(User::class); } /** * Get the topics for the thread. */ public function topics() { return $this->hasMany(ForumTopic::class, 'thread_id'); } /** * Get the route key for the model. * * @return string */ public function getRouteKeyName() { return 'slug'; } }