Пример #1
0
 public static function unit_list()
 {
     $types = Sell_Units::all();
     foreach ($types as $key => $value) {
         $list = DB::table("sell_units")->where("unit_type_id", $value->id)->get();
         $types[$key]->list = $list;
     }
     return $types;
 }
Пример #2
0
 public function showSellUnits()
 {
     //$types = DB::table("sell_units_type")->get();
     $types = Sell_Units::unit_list();
     return view('/dashboard/orders/units', ["title" => "銷售單位管理", "types" => $types]);
 }