laravel redirect url

url 重定向

use Illuminate\Http\RedirectResponse;

$response = new RedirectResponse($url);
 return $response;


设定cookies

use Illuminate\Support\Facades\Response as FacadeResponse;
        $content = view('shareClient.shareClient3') -> withDatas($datas);
        $response = FacadeResponse::make($content);

$foreverTokenCookie = Cookie::make('foreverToken', $foreverToken, 5);
                $stateTokenCookie = Cookie::make('stateToken', $state, 5);
                $response -> withCookie($foreverTokenCookie);
                $response -> withCookie($stateTokenCookie);         

 return $response;


阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

laravel redirect url

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭