Estado inicial: frontend React + backend Laravel

This commit is contained in:
Xavier Oliveira
2026-05-15 15:57:54 +01:00
commit 41c5f87d5b
216 changed files with 29916 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Category;
class Video extends Model
{
use HasFactory;
protected $table = 'videos';
protected $fillable = [
'title',
'description',
'url',
'thumbnail',
'duration',
'tags',
'is_active',
];
protected $casts = [
'is_active' => 'boolean',
];
public function categories()
{
return $this->belongsToMany(Category::class, 'video_category');
}
}