laravel redirect url

糜俊彦
2023-12-01

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;


 类似资料:

相关阅读

相关文章

相关问答