@@ -424,9 +424,9 @@ protected function ajaxResponse($message)
424424 // ajax but not pjax
425425 if ($ request ->ajax () && !$ request ->pjax ()) {
426426 return response ()->json ([
427- 'status ' => true ,
428- 'message ' => $ message ,
429- 'display ' => $ this ->applayFieldDisplay (),
427+ 'status ' => true ,
428+ 'message ' => $ message ,
429+ 'display ' => $ this ->applayFieldDisplay (),
430430 ]);
431431 }
432432
@@ -516,9 +516,9 @@ protected function getRelationInputs($inputs = []): array
516516 $ relations = [];
517517
518518 foreach ($ inputs as $ column => $ value ) {
519- if ((method_exists ($ this ->model , $ column ) ||
520- method_exists ($ this ->model , $ column = Str::camel ($ column ))) &&
521- !method_exists (Model::class, $ column )
519+ if ((method_exists ($ this ->model , $ column )
520+ || method_exists ($ this ->model , $ column = Str::camel ($ column )))
521+ && !method_exists (Model::class, $ column )
522522 ) {
523523 $ relation = call_user_func ([$ this ->model , $ column ]);
524524
@@ -605,7 +605,7 @@ public function update($id, $data = null)
605605 protected function redirectAfterStore ()
606606 {
607607 $ resourcesPath = $ this ->resource (0 );
608- $ key = $ this ->model ->getKey ();
608+ $ key = $ this ->model ->getKey ();
609609
610610 return $ this ->redirectAfterSaving ($ resourcesPath , $ key );
611611 }
@@ -702,7 +702,7 @@ protected function handleColumnUpdates($id, $data)
702702 protected function handleEditable (array $ input = []): array
703703 {
704704 if (array_key_exists ('_editable ' , $ input )) {
705- $ name = $ input ['name ' ];
705+ $ name = $ input ['name ' ];
706706 $ value = $ input ['value ' ];
707707
708708 Arr::forget ($ input , ['pk ' , 'value ' , 'name ' ]);
@@ -768,7 +768,7 @@ protected function updateRelation($relationsData)
768768 || $ relation instanceof Relations \BelongsTo;
769769
770770 $ isRelationUpdate = true ;
771- $ prepared = $ this ->prepareUpdate ([$ name => $ values ], $ oneToOneRelation , $ isRelationUpdate );
771+ $ prepared = $ this ->prepareUpdate ([$ name => $ values ], $ oneToOneRelation , $ isRelationUpdate );
772772
773773 if (empty ($ prepared )) {
774774 continue ;
@@ -851,8 +851,8 @@ protected function prepareUpdate(array $updates, $oneToOneRelation = false, $isR
851851 foreach ($ this ->fields () as $ field ) {
852852 $ columns = $ field ->column ();
853853
854- if ($ this ->isInvalidColumn ($ columns , $ oneToOneRelation || $ field ->isJsonType ) ||
855- (in_array ($ columns , $ this ->relation_fields ) && !$ isRelationUpdate )) {
854+ if ($ this ->isInvalidColumn ($ columns , $ oneToOneRelation || $ field ->isJsonType )
855+ || (in_array ($ columns , $ this ->relation_fields ) && !$ isRelationUpdate )) {
856856 continue ;
857857 }
858858
@@ -883,8 +883,8 @@ protected function prepareUpdate(array $updates, $oneToOneRelation = false, $isR
883883 protected function isInvalidColumn ($ columns , $ containsDot = false ): bool
884884 {
885885 foreach ((array ) $ columns as $ column ) {
886- if ((!$ containsDot && Str::contains ($ column , '. ' )) ||
887- ($ containsDot && !Str::contains ($ column , '. ' ))) {
886+ if ((!$ containsDot && Str::contains ($ column , '. ' ))
887+ || ($ containsDot && !Str::contains ($ column , '. ' ))) {
888888 return true ;
889889 }
890890 }
@@ -1089,7 +1089,6 @@ public function validationMessages($input)
10891089 if (!$ validator = $ field ->getValidator ($ input )) {
10901090 continue ;
10911091 }
1092-
10931092 if (($ validator instanceof Validator) && !$ validator ->passes ()) {
10941093 $ failedValidators [] = $ validator ;
10951094 }
@@ -1136,14 +1135,14 @@ public function getRelations(): array
11361135 if (Str::contains ($ column , '. ' )) {
11371136 list ($ relation ) = explode ('. ' , $ column );
11381137
1139- if (method_exists ($ this ->model , $ relation ) &&
1140- !method_exists (Model::class, $ relation ) &&
1141- $ this ->model ->$ relation () instanceof Relations \Relation
1138+ if (method_exists ($ this ->model , $ relation )
1139+ && !method_exists (Model::class, $ relation )
1140+ && $ this ->model ->$ relation () instanceof Relations \Relation
11421141 ) {
11431142 $ relations [] = $ relation ;
11441143 }
1145- } elseif (method_exists ($ this ->model , $ column ) &&
1146- !method_exists (Model::class, $ column )
1144+ } elseif (method_exists ($ this ->model , $ column )
1145+ && !method_exists (Model::class, $ column )
11471146 ) {
11481147 $ relations [] = $ column ;
11491148 }
@@ -1448,7 +1447,7 @@ public function input($key, $value = null)
14481447 *
14491448 * @return $this
14501449 */
1451- public function column ($ width , \ Closure $ closure ): self
1450+ public function column ($ width , Closure $ closure ): self
14521451 {
14531452 $ width = $ width < 1 ? round (12 * $ width ) : $ width ;
14541453
0 commit comments