planifibot/app/Models/Evento.php

23 lines
400 B
PHP
Raw Normal View History

2021-07-14 21:50:34 -03:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Evento extends Model
{
use HasFactory;
2021-07-14 22:33:14 -03:00
public function dias() {
return $this->hasMany(Dia::class);
}
public function coordinar() {
foreach ($this->dias() as $dia) {
//guardar (nombre, horario, cantidad)
}
}
2021-07-14 21:50:34 -03:00
}