You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
299B

  1. <?php
  2. namespace App\Util;
  3. use Illuminate\Support\Collection;
  4. class OptionUtil
  5. {
  6. static public function getOptions(Collection|array $data)
  7. {
  8. $ret = collect();
  9. foreach ($data as $key => $val) {
  10. $ret->push([$key => $val]);
  11. }
  12. return $ret;
  13. }
  14. }