', 0)->update(['active' => 1]); \App\Models\RentType::truncate(); $rent_types = ['小时', '台班', '趟', '天', '月', '立方米', '米']; foreach($rent_types as $key => $type) { \App\Models\RentType::create([ 'name' => $type, 'sort' => ($key + 1) ]); } } }