[英]Laravel how i get route with name in blade
我有一条这样的路线。
Route::group(['prefix'=>LaravelLocalization::setLocale(),
'as'=>'front.',
'middleware'=>['localeSessionRedirect','localizationRedirect',]],function ()
{
Route::get('/view/post/{id}', [ExtraController::class, 'SinglePost'])->name('post_view');
});
所以我想在刀片中调用这条路线。我如何获得 post_view 路线?
在你看来尝试这个:
//example:
<a href="{{route('post_view', $post->id)}}">
<a href="{{route('post_view', [$post->id])}}">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.