<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class DiaPreferencia extends Model
{

use HasFactory;
    protected $table = 'diaspreferencias';
    
    protected $fillable = [
        'descripcion',
        'formulario_id',
    ];

    public function formularios() 
    {
        return $this->belongsToMany(Formulario::class, 'formularios_diaspreferidos', 'diapreferencia_id', 'formulario_id');
    }
}
