Config.php 555 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Support\Facades\Cache;
  4. class Config extends BaseModel
  5. {
  6. protected $table = 'config';
  7. protected $fillable = ['field', 'val', 'remark', 'group_id'];
  8. /*
  9. * group_id
  10. * 1 系统基础配置
  11. * 2 频道消息配置
  12. * 3 用户自定义配置
  13. * 4 极速PC28相关配置
  14. *
  15. *
  16. */
  17. public static function setPc28Switch()
  18. {
  19. $pc28_switch = Cache::get('pc28_switch');
  20. static::where('field', 'pc28_switch')->update(['val' => $pc28_switch]);
  21. }
  22. }