Article.php 430 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Author: lf
  4. * Blog: https://blog.feehi.com
  5. * Email: job@feehi.com
  6. * Created at: 2017-08-30 18:10
  7. */
  8. namespace api\models;
  9. class Article extends \common\models\Article
  10. {
  11. public function fields()
  12. {
  13. return [
  14. 'title',
  15. "description" => "summary",
  16. "content" => function($model){
  17. return $model->articleContent->content;
  18. }
  19. ];
  20. }
  21. }