| Current Path : /var/www/html/dynaweb-cms-v1/app/Models/Backend/ |
| Current File : /var/www/html/dynaweb-cms-v1/app/Models/Backend/ContentSliderTranslation.php |
<?php
namespace App\Models\Backend;
use App\Models\Backend\ContentSlider;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Attributes\Table;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
#[Table('content_slider_translation', key: 'slider_translation_id')]
#[Fillable([
'slider_translation_parent_id',
'slider_translation_title',
'slider_translation_img',
'slider_translation_main',
'slider_translation_language',
'created_by',
'updated_by',
])]
class ContentSliderTranslation extends Model
{
use HasFactory;
protected function casts(): array
{
return [
'slider_translation_parent_id' => 'integer',
'slider_translation_main' => 'integer',
'created_by' => 'integer',
'updated_by' => 'integer',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
}
public function slider()
{
return $this->belongsTo(
ContentSlider::class,
'slider_translation_parent_id',
'slider_id'
);
}
}