segundo commit
This commit is contained in:
parent
4a4ede77f0
commit
020c85fe7d
|
@ -8,4 +8,12 @@ use Illuminate\Database\Eloquent\Model;
|
|||
class Dia extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public function evento() {
|
||||
return $this->belongsTo(Evento::class);
|
||||
}
|
||||
|
||||
public function horaFlags() {
|
||||
return $this->hasMany(HoraFlag::class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,4 +8,15 @@ use Illuminate\Database\Eloquent\Model;
|
|||
class Evento extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public function dias() {
|
||||
return $this->hasMany(Dia::class);
|
||||
}
|
||||
|
||||
public function coordinar() {
|
||||
foreach ($this->dias() as $dia) {
|
||||
//guardar (nombre, horario, cantidad)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,4 +8,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||
class HoraFlag extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public function dia() {
|
||||
return $this->belongsTo(Dia::class);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue