Model belonging to a multisite model

I got a model course who is using the multisite trait.
And I have an enrolment model thats belongsTo to a course.
but this model does not use a multisite trait, he does not need to and it does not make sense.

in the backend list, how can i display the course title properly from the relation ?

because per default, it is depending on the selected active site on the backend.
when on the english, i can see the english course title, but not the thai course thai title.

any idea ?

putting the solution here in case of:

enrolment.php

public $belongsTo = [
        'course' => [Course::class, 'deleted' => true, 'scope' => 'relatedCoursesAllSites'],
    ];

course.php

public function scopeRelatedCoursesAllSites($query)
    {
        return $query
            ->withoutGlobalScope(MultisiteScope::class) ;
    }
2 Likes