<br />
<b>Warning</b>:  Undefined variable $auth in <b>/home/pevo0181/public_html/pia-soft.com/cleania/routes/index.php</b> on line <b>542</b><br />
<br />
<b>Warning</b>:  Trying to access array offset on value of type null in <b>/home/pevo0181/public_html/pia-soft.com/cleania/routes/index.php</b> on line <b>542</b><br />
<?php

namespace App\Models;

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

class Matiere extends Model
{
    use HasFactory;

    protected $table = 'matieres';
    protected $primaryKey = 'mat_id';
    public $timestamps = false;
    protected $fillable = [
        'mat_name',
        'class_id',
        'mat_cycle',
        'mat_session',
        'competence_id',
        'mat_bareme_max',
        'div_group',
        'mat_moy_max',
        'titulaire_ad_id'
    ];

    public function competence()
    {
        return $this->belongsTo(Competence::class, 'competence_id', 'competence_id');
    }

    public function sousMatieres()
    {
        return $this->hasMany(SousMatiere::class, 'mat_id', 'mat_id');
    }

    pu