Update Table.php

修正框架默认的字段为 create_time 和 update_time
This commit is contained in:
joewulf 2016-10-17 11:25:49 +08:00 committed by 云无心
parent c548b07a63
commit 35bfc1fc8e

View File

@ -565,7 +565,7 @@ class Table
* *
* @return Table * @return Table
*/ */
public function addTimestamps($createdAtColumnName = 'created_at', $updatedAtColumnName = 'updated_at') public function addTimestamps($createdAtColumnName = 'create_time', $updatedAtColumnName = 'update_time')
{ {
$createdAtColumnName = is_null($createdAtColumnName) ? 'created_at' : $createdAtColumnName; $createdAtColumnName = is_null($createdAtColumnName) ? 'created_at' : $createdAtColumnName;
$updatedAtColumnName = is_null($updatedAtColumnName) ? 'updated_at' : $updatedAtColumnName; $updatedAtColumnName = is_null($updatedAtColumnName) ? 'updated_at' : $updatedAtColumnName;