@@ -19,26 +19,4 @@ class ConfigCityManagement extends BaseModel
protected $fillable = ['province_id','city_id','province_name','city_name','express_type'];
- /**
- *
- * 快递方式:0.快递;1. 自提
- * @return string
- */
- public function getExpressTypeAttribute()
- {
- $express_type = '';
- switch ($this->express_type) {
- case 0:
- $express_type = '快递';
- break;
- case 1:
- $express_type = '自提';
- default:
- }
-
- return $express_type;
}
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+class UpdateExpressTypeConfigCityManagementTable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('config_city_management', function (Blueprint $table) {
+ $table->string('express_type',50)->comment('快递方式')->change();
+ });
+ }
+ * Reverse the migrations.
+ public function down()
+ //
+}