瀏覽代碼

配置及基础文件方面更新

duqinya 6 年之前
父節點
當前提交
0f78f94a79

+ 10 - 0
app/Http/Controllers/AuthController.php

@@ -0,0 +1,10 @@
+<?php
+
+namespace App\Http\Controllers;
+
+
+class  AuthController extends BaseController
+{
+
+
+}

+ 9 - 0
app/Http/Controllers/BaseController.php

@@ -0,0 +1,9 @@
+<?php
+
+namespace App\Http\Controllers;
+
+
+class BaseController extends Controller
+{
+
+}

+ 2 - 1
app/Http/Controllers/Controller.php

@@ -1,10 +1,11 @@
 <?php
 
 namespace App\Http\Controllers;
-
+use Dingo\Api\Routing\Helpers;
 use Illuminate\Routing\Controller as BaseController;
 
 class Controller extends BaseController
 {
+    use Helpers;
 
 }

+ 12 - 0
app/Models/BaseModel.php

@@ -0,0 +1,12 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+
+class BaseModel extends Model
+{
+    protected $guarded = ['id'];
+
+    protected $hidden = ['deleted_at'];
+}

+ 4 - 3
composer.json

@@ -6,12 +6,13 @@
     "type": "project",
     "require": {
         "php": ">=7.1.3",
-        "dingo/api": "^2.2",
         "cviebrock/laravel-elasticsearch": "^3.5",
+        "dingo/api": "^2.2",
+        "doctrine/dbal": "^2.9",
         "hhxsv5/laravel-s": "~3.4.0",
         "laravel/lumen-framework": "5.8.*",
-        "vlucas/phpdotenv": "^3.3",
-        "tymon/jwt-auth": "1.0.0-rc.4.1"
+        "tymon/jwt-auth": "1.0.0-rc.4.1",
+        "vlucas/phpdotenv": "^3.3"
     },
     "require-dev": {
         "fzaninotto/faker": "^1.4",

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

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class UpdateProductIdCmsSubjectProductTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('cms_subject_product', function (Blueprint $table) {
+            $table->integer('product_id')->comment('商品ID')->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('cms_subject_product', function (Blueprint $table) {
+            $table->dropColumn(['product_id']);
+        });
+    }
+}