File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 2
2
namespace Former ;
3
3
4
4
use Closure ;
5
+ use Former \Traits \Field ;
5
6
use Illuminate \Container \Container ;
6
- use Illuminate \Validation \Validator ;
7
7
use Illuminate \Support \MessageBag ;
8
+ use Illuminate \Validation \Validator ;
8
9
9
10
/**
10
11
* Helps the user interact with the various Former components
@@ -139,7 +140,10 @@ public function __call($method, $parameters)
139
140
// Dispatch to the different Form\Fields
140
141
$ framework = isset ($ this ->app ['former.form.framework ' ]) ? $ this ->app ['former.form.framework ' ] : $ this ->app ['former.framework ' ];
141
142
$ field = $ this ->dispatch ->toFields ($ method , $ parameters );
142
- $ field = $ framework ->getFieldClasses ($ field , $ classes );
143
+
144
+ if ($ field instanceof Field) {
145
+ $ field = $ framework ->getFieldClasses ($ field , $ classes );
146
+ }
143
147
144
148
// Else bind field
145
149
$ this ->app ->instance ('former.field ' , $ field );
You can’t perform that action at this time.
0 commit comments