From e6bc7e5feacb303c72fa713989f8f5f842a76687 Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 14 Sep 2017 10:51:14 -0500 Subject: [PATCH] Adds getModel() It would be nice to be able to get the model before setting a new one (maybe in a partial) and having the original model to set back at the end of the partial. --- src/FormBuilder.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/FormBuilder.php b/src/FormBuilder.php index 2b69ac0..61fabf9 100644 --- a/src/FormBuilder.php +++ b/src/FormBuilder.php @@ -190,6 +190,16 @@ class FormBuilder { $this->model = $model; } + + /** + * Get the current model instance on the form builder. + * + * @return mixed $model + */ + public function getModel() + { + return $this->model; + } /** * Close the current form.