23 lines
400 B
PHP
23 lines
400 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
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)
|
|
|
|
}
|
|
}
|
|
}
|