laravel - Laravel vue 重定向到组件
问题描述
我是 vue js 的新手。
当请求 axios 发布到控制器时,它应该将重定向返回到同一组件。在我的方法中,我可以看到它在 borwser 下的网络面板中返回,我可以在预览部分看到它。但它应该在浏览器上工作。
catch (IncompletePayment $exception) {
if($exception->payment->status === 'requires_action'){
return redirect()->route(
'cashier.payment',
[$exception->payment->id, 'redirect'=>route('payment')]
);
}
return response()->json(['message' => $exception->payment->status, 'type'=>'stripe_error'], 206);
}
我的网络路线是这样的:
Route::get('/pay',function(){
return view('app');
})->name('payment');
Route::any('/{any}', function (){
return view('app');
})->where('any', '.*');
Auth::routes();
图像显示返回
解决方案
推荐阅读
- python - how to send data through websocket via custom loop "while"
- docker - 处理节点加入 docker swarm
- powerbi - DAX 查询联合多个表和返回不同
- wordpress - 羽化 iframe 的多个实例 - 未触发
- ios - 在swift4中设置和获取数组时发生奇怪的事情
- javascript - 我没有收到来自烧瓶服务器的套接字响应
- python - Jupyter 实验室:为什么单行变量不生成输出?
- asp.net-core - Asp.Net Core 2.1 在 Head 标签之间使用 ViewComponents 动态获取元数据
- c++ - Windows FileOpenDialog 返回错误的路径
- python - 如何从二进制字符串创建 PDF?