tp6 使用$this->success() $this->error() redirect() 完成转跳方法

官方系统不再提供基础控制器类think\Controller,原来的success、error、redirect和result方法需要自己在基础控制器类里面实现。
tp6 使用$this->success() $this->error() redirect() 完成转跳方法
1.安装下面的扩展用于支持旧版本的跳转操作
composer require liliuwei/thinkphp-jump
tp6 使用$this->success() $this->error() redirect() 完成转跳方法
2.在app下的BaseController.php 文件中添加:
use \liliuwei\think\Jump;要在下面加
tp6 使用$this->success() $this->error() redirect() 完成转跳方法
然后在使用,继承一下
tp6 使用$this->success() $this->error() redirect() 完成转跳方法
tp6 使用$this->success() $this->error() redirect() 完成转跳方法
注意:这句话加在上面会报错:
Call to undefined method app\admin\controller\login::success()