<?php

namespace App\Models;

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

class PropertyFacility extends Model
{
    use HasFactory;

    protected $fillable = [
        'id_prop',
        'id_facil',
    ];
    
    public function properties()
    {
        return $this->belongsToMany(
            Property::class,
            'property_facilities',
            'id_facil',
            'id_prop'
        );
    }
    
}
