【发布时间】:2021-08-22 16:17:57
【问题描述】:
我正在使用 laravel 的反应。
根据反应路由器制作我的视图路线
我在 web.php 中使用了这条路线
Route::get('/{path?}',function(){return view('welcome');});
除了其他 laravel 路线
Route::post("history",[historyController::class,'store']);
...
反应路线:
<Route exact path="/history" render={
()=>auth?
<React.Fragment>
<NavbarComp />
<Container>
<History/>
</Container>
</React.Fragment>
:
<Redirect to={{pathname:'/login'}}/>
}/>
我也有 laravel mail.blade.php
@component('mail::button', ['url' =>""]) shopping
history
@endcomponent
所以问题是如何在上面的 react 路由中从这个 mail.blade.php 路由到 /history 页面?
【问题讨论】:
标签: reactjs laravel react-router-dom