File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function addFakes($columns = ['extras'])
2626
2727 $ column_contents = $ this ->{$ column };
2828
29- if ($ this ->shouldDecodeFake ($ column )) {
29+ if ($ this ->shouldDecodeFake ($ column ) || ( $ this -> translationEnabled () && $ this -> isTranslatableAttribute ( $ column )) ) {
3030 $ column_contents = json_decode ($ column_contents );
3131 }
3232
@@ -67,7 +67,7 @@ public function withFakes($columns = [])
6767 */
6868 public function shouldDecodeFake ($ column )
6969 {
70- return ! in_array ($ column , array_keys ($ this ->casts ));
70+ return ! in_array ($ column , array_keys ($ this ->getCasts () ));
7171 }
7272
7373 /**
@@ -78,6 +78,6 @@ public function shouldDecodeFake($column)
7878 */
7979 public function shouldEncodeFake ($ column )
8080 {
81- return ! in_array ($ column , array_keys ($ this ->casts ));
81+ return ! in_array ($ column , array_keys ($ this ->getCasts () ));
8282 }
8383}
You can’t perform that action at this time.
0 commit comments