This commit is contained in:
Laucha1312
2026-06-04 15:14:46 -03:00
parent ed94601e34
commit 0841794c50
76 changed files with 0 additions and 7737 deletions
-33
View File
@@ -1,33 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Torneo extends Model
{
use SoftDeletes;
protected $table = 'torneos';
protected $fillable = [
'nombre',
'fecha_inicio',
'fecha_fin',
];
protected $casts = [
'fecha_inicio' => 'datetime',
'fecha_fin' => 'datetime',
];
public function equipos()
{
return $this->belongsToMany(Equipo::class, 'torneo_equipo', 'id_torneo', 'id_equipo')->withPivot('grupo');
}
public function eventos()
{
return $this->hasMany(Evento::class, 'id_torneo');
}
}