| Current Path : /var/www/html/dynaweb-cms-v1/app/Models/Backend/ |
| Current File : /var/www/html/dynaweb-cms-v1/app/Models/Backend/ContentDownload.php |
<?php
namespace App\Models\Backend;
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_downloads', key: 'download_id')]
#[Fillable([
'download_main',
'download_parent_id',
'download_language',
'download_category',
'download_status',
'download_date',
'download_source',
'download_start_date',
'download_start_time',
'download_end_date',
'download_end_time',
'download_title',
'download_img',
'download_file',
'created_by',
'updated_by',
])]
class ContentDownload extends Model
{
use HasFactory;
public function translations()
{
return $this->hasMany(self::class, 'download_parent_id', 'download_id');
}
protected function casts(): array
{
return [
'download_date' => 'date',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
}
}