Laravel的中间件

Laravel的成功跳转

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

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 2021-02-24 12:41  防空洞123  阅读(41)  评论(0编辑  收藏  举报

导航