TaoLer/app/admin/model/System.php
2021-07-07 17:40:43 +08:00

28 lines
383 B
PHP

<?php
namespace app\admin\model;
use think\Model;
use think\facade\Cache;
class System extends Model
{
//登陆校验
public function sets($data,$cy)
{
$sys = $this::find(1);
if($cy == 0){
unset($data['copyright']);
}
$res = $sys->save($data);
if($res){
Cache::delete('system');
return 1;
} else {
return Lang::get('edit error');
}
}
}