BodyTemplates.php 576 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: hp
  5. * Date: 2017/11/21
  6. * Time: 10:42
  7. */
  8. namespace App\Modules\Promotion\Models;
  9. use Illuminate\Database\Eloquent\Model;
  10. /**
  11. * Class BodyTemplates 内容模板
  12. * @package App\Modules\Promotion\Models
  13. */
  14. class BodyTemplates extends Model
  15. {
  16. protected $connection = 'api_mysql';
  17. protected $table = 'body_templates';
  18. /**
  19. * @return mixed获取所有的内容模板
  20. */
  21. static function getAllBodyTemplates()
  22. {
  23. return $bodyTemplatesResult = self::select('id', 'content','style')->get();
  24. }
  25. }