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::with(['students' => function($query) {
$query->where('id', Auth::id());
}])
->with('lessons')
->orderBy('id', 'desc')
->get();
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire