BodyTemplates.php 535 B

12345678910111213141516171819202122232425262728
  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 $table = 'body_templates';
  17. /**
  18. * @return mixed获取所有的内容模板
  19. */
  20. static function getAllBodyTemplates()
  21. {
  22. return $bodyTemplatesResult = self::select('id', 'content','style')->get();
  23. }
  24. }