duqinya преди 6 години
родител
ревизия
142e1c4143
променени са 2 файла, в които са добавени 32 реда и са изтрити 22 реда
  1. 0 22
      app/Models/ConfigCityManagement.php
  2. 32 0
      database/migrations/2019_04_26_034735_update_express_type_config_city_management_table.php

+ 0 - 22
app/Models/ConfigCityManagement.php

@@ -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 = '自提';
-                break;
-            default:
-        }
-
-        return $express_type;
-    }
-
 }

+ 32 - 0
database/migrations/2019_04_26_034735_update_express_type_config_city_management_table.php

@@ -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.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('config_city_management', function (Blueprint $table) {
+            //
+        });
+    }
+}