How To show only one id in laravel

Viewed 24

I found a problem when I wanna show my data's detail, it always take two data. this is my controller

public function show(Transaction $transactions)
    {
        $tran=Transaction::find($transactions);
        return $tran;
        return view('admin.transaction.show', compact('tran','transactions'));
    }

This is my show Button

<td>
<a href="{{route('transactions.show', $transaction->id) }}"><i class="far fa-eye" style="color:blue"></i></a>
</td>

and this is the return

enter image description here

How to solve it?

0 Answers
Related