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

+45
View File
@@ -0,0 +1,45 @@
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable
{
use HasApiTokens, HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}
+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');
}
}