/** * add related fields to searchable attributes * @return type */ public function attributes() { return array_merge(parent::attributes(), ['course.name', 'user.username', 'user.role.name']); }