Base controller was redisigned to use static function as middleware