<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Categorie extends Model
{
    public $timestamps = false;
    protected $primaryKey = 'ID_Categorie';
    protected $table = 'categories';

    protected $fillable = [
        'Nom',
        'Description',
    ];

    public function ressources()
    {
        return $this->belongsToMany(Ressource::class, 'ressource_categories', 'ID_Categorie', 'ID_Ressource', 'ID_Categorie', 'ID_Ressource');
    }
}
