ScaleCategory.php 579 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Models;
  3. class ScaleCategory extends SoftBaseModel
  4. {
  5. //是否投放首页
  6. const isIndexYes = 1;
  7. const isIndexNo = 0;
  8. const isIndexMap = array(
  9. self::isIndexYes => "是",
  10. self::isIndexNo => "否"
  11. );
  12. public function getPicAttribute()
  13. {
  14. return isset($this->attributes['pic']) ? config('console.pic_path').$this->attributes['pic'] : NULL;
  15. }
  16. public function getPic2Attribute()
  17. {
  18. return isset($this->attributes['pic2']) ? config('console.pic_path').$this->attributes['pic2'] : NULL;
  19. }
  20. }