Laravel的中间件

Laravel的成功跳转

https://www.cnblogs.com/php08049/p/9237581.html

1
2
3
4
5
6
7
8
public function handle(Request $request, Closure $next)
    {
        if($request->height<=150){
            //dd('身高不符合要求,即将跳转页面');
            return redirect('shitu');
        }
        return $next($request);
    }

Laravel模仿tp的success,error跳转

https://learnku.com/laravel/t/11041/imitates-tp5-and-writes-the-error-and-success-methods

posted on   防空洞123  阅读(46)  评论(0编辑  收藏  举报

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示