Laravel, vlookup version
I have 3 databases like theses : formations subjects formation_subject | id | name| | id | name | is_optional | | formation_id | subject_id | ___________ _________________________ ____________________________ where in the ModelsSubject, public function formations() { return $this->belongsToMany(Formation::class); }…