add addAttribute Method to BaseController