belongsTo(Lecturer::class); } public static function getOptionsForLecturer(Lecturer $lecturer): Collection { return static::query() ->where('lecturer_id', $lecturer->id) ->get(); } public function materials(): HasMany { return $this->hasMany(Material::class); } }