diff --git a/app/helpers.php b/app/helpers.php new file mode 100644 index 0000000..322074b --- /dev/null +++ b/app/helpers.php @@ -0,0 +1,36 @@ + +getPdo(); + return true; + } catch (\Throwable $th) { + return false; + } + }); + + $non_cawangan_database = ['lelong', 'online_arrahn', 'kaunterpkb']; + + $all_cawangan_db = array_filter($all_active_db_keys, function ($db_key) use ($non_cawangan_database) { + $isNotCawangan = in_array(config('database.connections.' . $db_key . '.database'), $non_cawangan_database); + + if ($isNotCawangan) { + return false; + } + + return true; + }); + + return $all_cawangan_db; + + } + +}