File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/app/Library/CrudPanel Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -68,20 +68,21 @@ public static function name($name)
6868 }
6969
7070 /**
71- * Change the CrudColumn key
71+ * Change the CrudColumn key.
7272 *
7373 * @param string $key New key for the column
7474 * @return CrudColumn
7575 */
7676 public function key (string $ key )
7777 {
78- if (! isset ($ this ->attributes ['name ' ])) {
78+ if (! isset ($ this ->attributes ['name ' ])) {
7979 abort (500 , 'Column name must be defined before changing the key. ' );
8080 }
8181 if ($ this ->crud ()->hasColumnWhere ('key ' , $ this ->attributes ['key ' ])) {
8282 $ this ->crud ()->setColumnDetails ($ this ->attributes ['key ' ], array_merge ($ this ->attributes , ['key ' => $ key ]));
8383 }
8484 $ this ->attributes ['key ' ] = $ key ;
85+
8586 return $ this ;
8687 }
8788
You can’t perform that action at this time.
0 commit comments