Files
cleargame/app/Models/ForumCategory.php
T

34 lines
541 B
PHP
Raw Normal View History

2026-02-22 20:02:34 +02:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ForumCategory extends Model
{
protected $fillable = [
'name',
'slug',
'description',
'order',
];
/**
* Get the threads for the category.
*/
public function threads()
{
return $this->hasMany(ForumThread::class, 'category_id');
}
/**
* Get the route key for the model.
*
* @return string
*/
public function getRouteKeyName()
{
return 'slug';
}
}