File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/app/Library/CrudPanel/Traits Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -142,8 +142,7 @@ protected function makeSureColumnHasEntity($column)
142142 // if the name is dot notation it might be a relationship
143143 if (strpos ($ column ['name ' ], '. ' ) !== false ) {
144144 $ possibleMethodName = Str::before ($ column ['name ' ], '. ' );
145- $ model = $ this ->model ;
146-
145+
147146 // if the first part of the string exists as method,
148147 // it is a relationship
149148 if (method_exists ($ this ->model , $ possibleMethodName )) {
@@ -155,6 +154,8 @@ protected function makeSureColumnHasEntity($column)
155154
156155 $ attribute_in_relation = false ;
157156
157+ $ model = $ this ->model ;
158+
158159 // here we are going to iterate through all relation parts to check
159160 // if the attribute is present in the relation string.
160161 foreach ($ parts as $ i => $ part ) {
You can’t perform that action at this time.
0 commit comments