www.gusucode.com > Flarum PHP论坛 中文版 v0.1 beta7源码程序 > FlarumChina-master/vendor/reflar/gamification/migrations/2017_09_05_214452_add_time_attribute_to_users.php
<?php /** * This file is part of reflar/gamification. * * Copyright (c) ReFlar. * * http://reflar.io * * For the full copyright and license information, please view the license.md * file that was distributed with this source code. */ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Builder; return [ 'up' => function (Builder $schema) { $schema->table('users', function (Blueprint $table) { $table->dateTime('last_vote_time'); }); }, 'down' => function (Builder $schema) { $schema->table('users', function (Blueprint $table) { $table->dropColumn('last_vote_time'); }); }, ];