how to match two tables’s column’s value and get the result from perticular column’s value in laravel relationship?

how to compaire two tables value and get the result of particular column value from both tables in laravel relationship method? I don’t know how to do it with relationship, at the same time I don’t know whether it is based on many to many or one to many relationship. at the same time I have to do it with where condition.
here is my mormal query example for my requested code:
select teacher.teacher_name, subject. subject_name from teacher join subject on teacher.subject_token = subject.token where teacher.teacher_token = ‘1’;