日志增加索引
This commit is contained in:
@@ -28,6 +28,7 @@ class Log extends Model
|
|||||||
self::TYPE_QUERY => '查询',
|
self::TYPE_QUERY => '查询',
|
||||||
self::TYPE_GRANT => '发券',
|
self::TYPE_GRANT => '发券',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function __construct(array $attributes = [])
|
public function __construct(array $attributes = [])
|
||||||
{
|
{
|
||||||
parent::__construct($attributes);
|
parent::__construct($attributes);
|
||||||
@@ -39,9 +40,9 @@ class Log extends Model
|
|||||||
Schema::create($this->table, function (Blueprint $table) {
|
Schema::create($this->table, function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->string('path', 255);
|
$table->string('path', 255);
|
||||||
$table->string('method', 15);
|
$table->string('method', 15)->index();
|
||||||
$table->text('in_source');
|
$table->text('in_source');
|
||||||
$table->string('type', 20);
|
$table->string('type', 20)->index();
|
||||||
$table->text('out_source')->nullable();
|
$table->text('out_source')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,13 +2,12 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Laravel - A PHP Framework For Web Artisans
|
* Laravel - A PHP Framework For Web Artisans
|
||||||
*
|
|
||||||
* @package Laravel
|
|
||||||
* @author Taylor Otwell <taylor@laravel.com>
|
* @author Taylor Otwell <taylor@laravel.com>
|
||||||
|
* @package Laravel
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('LARAVEL_START', microtime(true));
|
define('LARAVEL_START', microtime(true));
|
||||||
echo phpinfo();
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Register The Auto Loader
|
| 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';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user