Beispiel #1
0
 function get_cat_select_arr($with_empty_field = false)
 {
     $cat_arr = $with_empty_field ? ["0" => ""] : [];
     Category::whereLang(L::get_admin())->get(["id", "description"])->each(function ($cat) use(&$cat_arr) {
         $cat_arr[$cat->id] = $cat->description;
     });
     return $cat_arr;
 }