首页 thinkPHP 正文

tp6+中无法使用 $this-success(),$this->error()解决办法

安装下面的扩展用于支持旧版本的跳转操作

composer require liliuwei/thinkphp-jump

在BaseController中引入

use liliuwei\think\Jump; //添加
/**
 * 控制器基础类
 */
abstract class BaseController
{
    use Jump; //添加

 

评论
更换验证码
友情链接