From 4a7d2465f42a1920f0b89ab7485e19ca6cdfd0cd Mon Sep 17 00:00:00 2001 From: xuanchen <122383162@qq.com> Date: Wed, 26 Aug 2020 08:58:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=A2=9E=E5=8A=A0=E7=B4=A2?= =?UTF-8?q?=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Log.php | 19 ++++++++++--------- public/index.php | 9 ++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/Models/Log.php b/app/Models/Log.php index 488e82f..7c11b33 100644 --- a/app/Models/Log.php +++ b/app/Models/Log.php @@ -19,15 +19,16 @@ class Log extends Model ]; const TYPE_FREEZECOUPON = 'freezecoupon'; - const TYPE_DESTROY = 'destroy'; - const TYPE_QUERY = 'query'; - const TYPE_GRANT = 'grant'; - const TYPES = [ + const TYPE_DESTROY = 'destroy'; + const TYPE_QUERY = 'query'; + const TYPE_GRANT = 'grant'; + const TYPES = [ self::TYPE_FREEZECOUPON => '核销', - self::TYPE_DESTROY => '作废', - self::TYPE_QUERY => '查询', - self::TYPE_GRANT => '发券', + self::TYPE_DESTROY => '作废', + self::TYPE_QUERY => '查询', + self::TYPE_GRANT => '发券', ]; + public function __construct(array $attributes = []) { parent::__construct($attributes); @@ -39,9 +40,9 @@ class Log extends Model Schema::create($this->table, function (Blueprint $table) { $table->increments('id'); $table->string('path', 255); - $table->string('method', 15); + $table->string('method', 15)->index(); $table->text('in_source'); - $table->string('type', 20); + $table->string('type', 20)->index(); $table->text('out_source')->nullable(); $table->timestamps(); }); diff --git a/public/index.php b/public/index.php index 6ed8bae..15a29e2 100644 --- a/public/index.php +++ b/public/index.php @@ -2,13 +2,12 @@ /** * Laravel - A PHP Framework For Web Artisans - * - * @package Laravel * @author Taylor Otwell + * @package Laravel */ define('LARAVEL_START', microtime(true)); -echo phpinfo(); + /* |-------------------------------------------------------------------------- | Register The Auto Loader @@ -21,7 +20,7 @@ echo phpinfo(); | */ -require __DIR__.'/../vendor/autoload.php'; +require __DIR__ . '/../vendor/autoload.php'; /* |-------------------------------------------------------------------------- @@ -35,7 +34,7 @@ require __DIR__.'/../vendor/autoload.php'; | */ -$app = require_once __DIR__.'/../bootstrap/app.php'; +$app = require_once __DIR__ . '/../bootstrap/app.php'; /* |--------------------------------------------------------------------------