I have a table containing
id name
and a language table containing
id subject_id
and partition table
id name
final table of subject sections (summary table)
id subject_id division_id
now there is a one-to-one relationship between the table of the table of objects and languages and the many-to-many relationship between the table of objects and the division table, I need to pluck only the topics of the subject table without languages, using the relationship function
now I can only get the languages of the object object table of the relationship function in the section model as shown below
public function langSubject () { return $this->belongsToMany('Subject' , 'subject_division','division_id','subject_id') ->join('lang_subject', 'lang_subject.subject_id' ,'=', 'subject.id')->get(); }
But so far I can’t get items only without languages
Any suggestions?
source share