正在显示
2 个修改的文件
包含
6 行增加
和
1 行删除
| @@ -9,6 +9,11 @@ class Base extends Model | @@ -9,6 +9,11 @@ class Base extends Model | ||
| 9 | { | 9 | { |
| 10 | protected $table = ''; | 10 | protected $table = ''; |
| 11 | public $allCount = 0; | 11 | public $allCount = 0; |
| 12 | + | ||
| 13 | + protected $casts = [ | ||
| 14 | + 'created_at' => 'datetime:Y-m-d H:i:s', | ||
| 15 | + 'updated_at' => 'datetime:Y-m-d H:i:s', | ||
| 16 | + ]; | ||
| 12 | /** | 17 | /** |
| 13 | * @name 列表数据 | 18 | * @name 列表数据 |
| 14 | * @return void | 19 | * @return void |
| @@ -5,7 +5,7 @@ namespace App\Models; | @@ -5,7 +5,7 @@ namespace App\Models; | ||
| 5 | class Manager extends Base | 5 | class Manager extends Base |
| 6 | { | 6 | { |
| 7 | //设置关联表名 | 7 | //设置关联表名 |
| 8 | - protected $table = 'manager'; | 8 | + protected $table = 'gl_manager'; |
| 9 | //自动维护create_at创建时间 updated_at修改时间 | 9 | //自动维护create_at创建时间 updated_at修改时间 |
| 10 | public $timestamps = true; | 10 | public $timestamps = true; |
| 11 | 11 |
-
请 注册 或 登录 后发表评论