insertGetId($data); return $ttid; } public static function updateTruckType($ttid, $data) { return DB::table("t_conf_truck_types")->where("id", $ttid)->update($data); } public static function deleteTruckType($ttid) { return DB::table("t_conf_truck_types")->where("id", $ttid)->delete(); } /** * t_vehicles_types */ public static function getTypeById($id) { return DB::select("SELECT * FROM t_vehicles_types WHERE id = ? LIMIT 1;", [$id]); } public static function addTypes($data) { return DB::table("t_vehicles_types")->insertGetId($data); } public static function updtTypes($tid, $data) { return DB::table("t_vehicles_types")->where("id", $tid)->update($data); } }