first commit

This commit is contained in:
ghassan committed 2026-02-24 16:55:11 +00:00
commit 6a2026df4b
87 files changed
+13271

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Video extends Model
{
protected $fillable = [
'title',
'description',
'filename',
'path',
'thumbnail',
'duration',
'size',
'status',
];
protected $casts = [
'duration' => 'integer',
'size' => 'integer',
];
public function getUrlAttribute()
{
return asset('storage/videos/' . $this->filename);
}
public function getThumbnailUrlAttribute()
{
if ($this->thumbnail) {
return asset('storage/thumbnails/' . $this->thumbnail);
}
return asset('images/video-placeholder.jpg');
}
}