Add relations in tables, add saving states for datatables, minor fixes

This commit is contained in:
Ludovic CANDELLIER
2021-09-14 23:14:03 +02:00
parent 1dcc3e34a9
commit ffb9f81353
16 changed files with 255 additions and 47 deletions

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Repositories\Core;
class Arrays
{
public static function changeKeyName($array, $newkey, $oldkey)
{
foreach ($array as $key => $value) {
if (is_array($value)) {
$array[$key] = self::changeKeyName($value, $newkey, $oldkey);
} else {
$array[$newkey] = $array[$oldkey];
}
}
unset($array[$oldkey]);
return $array;
}
}