You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
613 B

7 years ago
  1. <?php
  2. namespace App\Http\Model;
  3. use Illuminate\Database\Eloquent\Model;
  4. use DB;
  5. class Kuaidi extends Model
  6. {
  7. //轮播图
  8. protected $table = 'kuaidi';
  9. public $timestamps = false;
  10. protected $guarded = []; //$guarded包含你不想被赋值的字段数组。
  11. //获取是否显示文字:0显示,1不显示
  12. public static function getStatusText($where)
  13. {
  14. $res = '';
  15. if($where['status'] === 0)
  16. {
  17. $res = '显示';
  18. }
  19. elseif($where['status'] === 1)
  20. {
  21. $res = '不显示';
  22. }
  23. return $res;
  24. }
  25. }