12-05-2026 Frontend dev
This commit is contained in:
parent
405df0a122
commit
5b8bdf4182
779 changed files with 480564 additions and 6241 deletions
43
app/Models/FooterCode.php
Normal file
43
app/Models/FooterCode.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\Portal;
|
||||
use Database\Factories\FooterCodeFactory;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class FooterCode extends Model
|
||||
{
|
||||
/** @use HasFactory<FooterCodeFactory> */
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'portal',
|
||||
'language',
|
||||
'title',
|
||||
'content',
|
||||
'is_global',
|
||||
'is_active',
|
||||
'priority',
|
||||
'legacy_portal',
|
||||
'legacy_id',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'portal' => Portal::class,
|
||||
'is_global' => 'boolean',
|
||||
'is_active' => 'boolean',
|
||||
'priority' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
public function categories(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Category::class, 'category_footer_code');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue