protected function component($id)
    {
        $model = $this->repository->findOneById($id);
        if (is_null($model)) {
            return new JsonResponse(['message' => ''], 200);
        }
        $classname = $model->data['classname'];
        $instance  = new $classname;

        if ($instance->getAttribute('ajaxable') === false) {
            return new JsonResponse('', 302);
        }
        $inputs = Input::get('attributes');

        if (!is_null($inputs) and method_exists($instance, 'hydrate')) {
            $args = empty($inputs) ? [] : unserialize($inputs);
            $instance->hydrate($args);
        }
        return $instance;
    }