File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -31,20 +31,16 @@ public function index(Request $request): LengthAwarePaginator
3131
3232 protected function updatePartial (Object $ object , Request $ request )
3333 {
34- $ data = [];
35- foreach ($ request ->all () as $ column => $ content ) {
36- if (is_array ($ content )) {
37- foreach ($ content as $ key => $ value ) {
38- $ data [$ column .'-> ' .$ key ] = $ value ;
34+ foreach ($ request ->only ('status ' ) as $ key => $ content ) {
35+ if ($ object ->isTranslatableAttribute ($ key )) {
36+ foreach ($ content as $ lang => $ value ) {
37+ $ object ->setTranslation ($ key , $ lang , $ value );
3938 }
4039 } else {
41- $ data [ $ column ] = $ content ;
40+ $ object ->{ $ key } = $ content ;
4241 }
4342 }
4443
45- foreach ($ data as $ key => $ value ) {
46- $ object ->{$ key } = $ value ;
47- }
4844 $ object ->save ();
4945 }
5046
You can’t perform that action at this time.
0 commit comments