Agrego archivos iniciales

This commit is contained in:
Laucha1312
2026-06-04 14:47:50 -03:00
commit ed94601e34
76 changed files with 7737 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?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');
}
}