mardi 1 décembre 2020

WhereHas is not working in laravel server

WhereHas condition is not working in the server because of the updated version. but it is working in local. so plesase suggest me the alternative of this: here is the query i am trying to execute:

$purchased_courses = Course::whereHas('students' => function($query) {
                $query->where('id', Auth::id());
            })
            ->with('lessons')
            ->orderBy('id', 'desc')
            ->get();


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3mqzq1X
via IFTTT

Aucun commentaire:

Enregistrer un commentaire