I have a route same like this.
Route::group(['prefix'=>LaravelLocalization::setLocale(),
'as'=>'front.',
'middleware'=>['localeSessionRedirect','localizationRedirect',]],function ()
{
Route::get('/view/post/{id}', [ExtraController::class, 'SinglePost'])->name('post_view');
});
So i want call this route in blade.How i get post_view route?
My Answer:
'admin'], function () {
Route::get('dashboard', 'AdminController@dashboard')->name('admin.dashboard');
});
In your blade file, you can use the route() helper function to generate the URL for the named route like this:
php
Dashboard
This will generate the URL for the 'admin.dashboard' route and output it in the href attribute of the anchor tag.
Rate this post
4 of 5 based on 5055 votesComments