亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

ThinkPHP 6 添加跳轉(zhuǎn)提示擴(kuò)展 liliuwei/thinkphp-jump的操作方法

 更新時間:2023年08月02日 14:21:00   作者:wkj001  
liliuwei/thinkphp-jump 是 TP5 中經(jīng)典跳轉(zhuǎn)提示,在 TP6 中已經(jīng)取消,通過 composer 下載該擴(kuò)展可以在 TP6 中使用 TP5 的跳轉(zhuǎn)提示操作,這篇文章主要介紹了ThinkPHP 6 添加跳轉(zhuǎn)提示擴(kuò)展 liliuwei/thinkphp-jump,需要的朋友可以參考下

liliuwei/thinkphp-jump 是 TP5 中經(jīng)典跳轉(zhuǎn)提示,在 TP6 中已經(jīng)取消,通過 composer 下載該擴(kuò)展可以在 TP6 中使用 TP5 的跳轉(zhuǎn)提示操作。

在這里插入圖片描述

安裝擴(kuò)展

在應(yīng)用根目錄執(zhí)行:

composer require liliuwei/thinkphp-jump

引入擴(kuò)展

在全局配置目錄生成 jump.php 文件:

return[
    // 默認(rèn)跳轉(zhuǎn)頁面對應(yīng)的模板文件
    'dispatch_success_tmpl' => app()->getRootPath().'/vendor/liliuwei/thinkphp-jump/src/tpl/dispatch_jump.tpl',
    'dispatch_error_tmpl'   => app()->getRootPath().'/vendor/liliuwei/thinkphp-jump/src/tpl/dispatch_jump.tpl',
];

使用擴(kuò)展

<?php
namespace app\controller;
class Index 
{
    // 在控制器中引入 Jump
    use \liliuwei\think\Jump; 
    public function index(){
        return  $this->success('成功','跳轉(zhuǎn)地址');
        return  $this->error('失敗','跳轉(zhuǎn)地址');
    }
}

到此這篇關(guān)于ThinkPHP 6 添加跳轉(zhuǎn)提示擴(kuò)展 liliuwei/thinkphp-jump的文章就介紹到這了,更多相關(guān)ThinkPHP跳轉(zhuǎn)擴(kuò)展內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論