protected function makeForm($resource, $class, $model)
    {
        $form = $this->container->make($class);

        if (!$this->formRules($form) && $rules = $this->rules($resource)) {
            $form->getValidator()->setRules($rules);
        }

        if ($model) {
            $form->setModel($model);
        }

        $this->publish($resource, 'form.created', [$form]);

        return $form;
    }