Reputation: 753
I have grid with multiple column and one of it for me to press the edit button so I can pass the id and on the route I will call the sql and get the relevant values and call the edit view. Below is my codes how I pass the id value.
<td><a href="{{url('/edittestdetails/',{{$test->ID}})}}>Edit</a></td>
. I prefer the url to be edittestdetails?id=value?
but now nothing is appearing when I call the url the paramereter is not appearing.
Upvotes: 1
Views: 66
Reputation: 163748
The correct syntax is:
<a href="{{ url('/edittestdetails/', $test->id) }}>Edit</a>
{{}}
will be converted to the echo()
clause, so you can't use {{}}
inside another {{}}
construction.
Also, property name is id
by default and not ID
.
Upvotes: 1
Reputation: 2436
<td><a href="{{ url('/edittestdetails/', $test->ID) }}">Edit</a></td>
Upvotes: 1