Files
wticreatorstudio/Modules/JobPortal/Entities/SEO.php
T
2024-02-12 22:54:20 -05:00

35 lines
748 B
PHP

<?php
namespace Modules\JobPortal\Entities;
use Modules\JobPortal\Entities\BaseModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class SEO extends BaseModel
{
use HasFactory;
protected $table = 'jp_seo';
protected $fillable = [
'seo_index',
'seo_title',
'seo_desc',
'seo_image',
'seo_share',
];
protected $casts = [
'seo_share' => 'array',
];
public function fill(array $attributes)
{
if(!empty($attributes)){
foreach ( $this->fillable as $item ){
$attributes[$item] = $attributes[$item] ?? null;
}
}
return parent::fill($attributes); // TODO: Change the autogenerated stub
}
}