Created
January 29, 2015 16:25
-
-
Save bcho/5e6f791469b443b7707a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php namespace Vtmer\Blog\Model; | |
| class PostModel extends \Eloquent { | |
| // 文章查看相关的记录 | |
| use PostVisitTrait; | |
| // 作者关联定义 | |
| use PostAuthorTrait; | |
| /** | |
| * 数据表名 | |
| * | |
| * @var string | |
| */ | |
| protected $table = 'post'; | |
| protected function getPageViewsField() { return 'page_views'; } | |
| protected function getPopularThreshold() { return 100; } | |
| // 其他的模型相关定义 | |
| // ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment