Reputation: 99
this a tag use in table, so using table data I want to forward id to new page, here I attach my code
<table class="table">
<thead>
<tr>
<th scope="col">Add ID</th>
</tr>
</thead>
@foreach($PDFS ?? '' as $PDF)
<tr>
<td>{{$PDF->AddID}}</td>
<td><a href="{{route('ORP_Print_SMID',[app()->getLocale(),'id'=>'{{$PDF->AddID}}']) }}">open</a>
</td>
</tr>
@endforeach
<tbody></tbody></table>
this is not working.
but below code is working
<a href="{{ route('ORP_Print_SMID', [app()->getLocale(),'id' => '24']) }}" >find</a>
actual data in this variable is '24'
{{$PDF->AddID}} =24
how I solve this, plz help me
Upvotes: 0
Views: 23
Reputation: 5662
There is no need to use {{ }}
again inside {{ }}
Change
<td><a href="{{route('ORP_Print_SMID',[app()->getLocale(),'id'=>'{{$PDF->AddID}}']) }}">open</a>
to
<td><a href="{{route('ORP_Print_SMID',[app()->getLocale(),'id'=>$PDF->AddID]) }}">open</a>
Upvotes: 1