public function update(Listener $listener, $id, array $input)
    {
        $model     = with(new Eloquent())->findOrNew($id);
        $memory    = app('antares.memory')->make('ui-components');
        $className = $memory->get($model->name . '.name');
        $component = with(new $className($model->id));
        $rules     = $component->getRules();
        if (empty($rules)) {
            return Response::json([], 200);
        }
        $validation = ValidatorFacade::make($input, $rules);


        if ($validation->fails()) {
            if (app('request')->ajax()) {
                return Response::json($validation->getMessageBag()->getMessages(), 200);
            }
            return $listener->whenValidationFailed($validation->getMessageBag());
        } else {
            $controls      = $component->controls();
            $value         = unserialize($model->value);
            $value['data'] = array_only($input, $controls);
            $model->value  = serialize($value);
            $model->save();
            $memory->getHandler()->forgetCache($this->getResource());
            return Response::json([], 200);
        }
    }