mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-08-04 00:16:08 -04:00
26 lines
545 B
PHP
26 lines
545 B
PHP
<?php
|
|
|
|
namespace Modules\Frontend\Entities;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class Section extends Model
|
|
{
|
|
protected $table = 'frontend_sections';
|
|
protected $fillable = [
|
|
'title',
|
|
'layout',
|
|
];
|
|
|
|
public function items()
|
|
{
|
|
return $this->hasMany(SectionItem::class);
|
|
}
|
|
|
|
public function categories()
|
|
{
|
|
return $this->hasManyThrough(Category::class, SectionCategory::class, 'section_id', 'id', 'id', 'category_id');
|
|
}
|
|
}
|