How can I pass parameter in route href={{Route('test'./$val}} to blade view?

Published 7 months ago by Webiondev123

How can I pass parameter in route href={{Route('test'./$val}}

<p><a href={{Route('test'./$val}}" class="btn btn-info btn-xs" role="button">know more</a> 

Route::get('/test/{id}', '[email protected]')->name('test');


 public function test($id){

        return view('test')->with('id', $id);

    }

Route not found

Best Answer (As Selected By Webiondev123)
Dry7

@Webiondev123

<p><a href="{{route('test', $id)}}" class="btn btn-info btn-xs" role="button">know more</a> 

Dry7
Dry7
7 months ago (151,880 XP)

@Webiondev123

<p><a href="{{route('test', $id)}}" class="btn btn-info btn-xs" role="button">know more</a> 

Webiondev123

@Dry7 the rescuer!

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