浏览代码

删除内容日志

wzq 5 年之前
父节点
当前提交
348c683f8a

+ 1 - 0
app/Http/Controllers/ConfigController.php

@@ -38,6 +38,7 @@ class ConfigController extends Controller
             //日志类型
             'log_type' => [
                 'add_data' => '增加数据',
+                'delete' => '删除内容',
             ],
             //是否推荐
             'is_suggest' => [

+ 1 - 0
app/Transformers/Post/LogTransformer.php

@@ -20,6 +20,7 @@ class LogTransformer extends TransformerAbstract
             'add_praise_count' => '增加点赞数:',
             'add_collect_count' => '增加收藏数:',
             'add_share_count' => '增加分享数:',
+            'delete' => '删除内容:',
         ];
         $data = json_decode($postLog['content']);
         $content = '';

+ 35 - 0
database/migrations/2019_07_09_145014_add_operator_type_to_post_log.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddOperatorTypeToPostLog extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('post_log', function (Blueprint $table) {
+            $table->string('operator_type',16)
+                ->default('admin')
+                ->after('uid')
+                ->comment('操作人类型(user用户,admin后台人员,system 系统)');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('post_log', function (Blueprint $table) {
+            //
+        });
+    }
+}