userable_type == Teacher::class) { return $grade ->lessons() ->where('teacher_id', Auth::user()->userable_id) ->filter() ->get(); } return $grade->lessons()->filter()->get(); } }