File tree Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -754,4 +754,22 @@ public function refresh()
754
754
755
755
return $ this ;
756
756
}
757
+
758
+ /**
759
+ * @inheritDoc
760
+ */
761
+ public function toArray ()
762
+ {
763
+ $ embeds = [];
764
+
765
+ foreach (array_keys ($ this ->getAttributes ()) as $ key ) {
766
+ if ($ this ->isEmbedRelation ($ key )) {
767
+ $ embeds [] = $ key ;
768
+ }
769
+ }
770
+
771
+ $ this ->loadMissing ($ embeds );
772
+
773
+ return parent ::toArray ();
774
+ }
757
775
}
Original file line number Diff line number Diff line change @@ -98,22 +98,4 @@ public function isEmbedRelation($key)
98
98
return $ this ->isRelation ($ key )
99
99
&& is_a ($ this ->{$ key }(), EmbedsOneOrMany::class, true );
100
100
}
101
-
102
- /**
103
- * @inheritDoc
104
- */
105
- public function toArray ()
106
- {
107
- $ embeds = [];
108
-
109
- foreach (array_keys ($ this ->getAttributes ()) as $ key ) {
110
- if ($ this ->isEmbedRelation ($ key )) {
111
- $ embeds [] = $ key ;
112
- }
113
- }
114
-
115
- $ this ->loadMissing ($ embeds );
116
-
117
- return parent ::toArray ();
118
- }
119
101
}
You can’t perform that action at this time.
0 commit comments