public function setModel($model) { $this->requireServerValidation = is_object($model); if (!$this->requireServerValidation) { //Just a model name was passed. $model = new $model(); } if (!is_subclass_of($model, "Elitexp\\AspNet\\Model")) { throw new \Exception("The Model should extend the AspNet Model for correct behavior."); } parent::setModel($model); }
/** * Set the model instance on the form builder. * * @param mixed $model * @return void * @static */ public static function setModel($model) { \Illuminate\Html\FormBuilder::setModel($model); }