belongsTo(Lieu::class); } public function membres(): BelongsToMany { return $this->belongsToMany(User::class, 'section_user') ->withPivot('role_in_section'); } public function sources(): HasMany { return $this->hasMany(Source::class); } public function responsables(): BelongsToMany { return $this->belongsToMany(User::class, 'section_user') ->wherePivot('role_in_section', 'section_manager') ->withPivot('role_in_section'); } }