26 lines
535 B
PHP
26 lines
535 B
PHP
<?php
|
|
|
|
namespace Modules\DocumentManagement\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
// use Modules\DocumentManagement\Database\Factories\DocumentCategoryFactory;
|
|
|
|
class DocumentCategory extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected $fillable = [
|
|
'name',
|
|
'description',
|
|
];
|
|
|
|
public function documents()
|
|
{
|
|
return $this->hasMany(Document::class, 'category_id');
|
|
}
|
|
}
|