afoysal
1 week ago

Route from Variable

Posted 1 week ago by afoysal

I have a route like below

<a href="{{route('startRun')}}">

But I would like to use Variable like below

<a href="{{route("start".$last_word)}}">

I am getting error like below

Route [startRun ] not defined.

My route in web.php file is like below

Route::get('/run','[email protected]')->name('startRun');

Please sign in or create an account to participate in this conversation.