I select that specific user
How? using select tag or there is a view button
<a href="{{route("users.show",["id"=>$user->id])}}">View </a>
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello guys, I have a list of user and If I select that specific user I want to go that user profile (which another component). I don't have ideas on routing of livewire.
just do this. web.php
Route::get('/user-profile/{user}', UserInvestmentTable::class)->name('user-profile');
in the blade
<button wire:click="showUser({{ $user->id }})" class="btn btn-info delete-header m-1 btn-sm" title="Show User"><i class="fas fa-eye" small></i></button>
in the action component
public function showUser($id){
return redirect()->route('user-profile',['user' => $id]);
}
and in the redirected component
public User $user;
// or
public $user;
public function mount(User $user)
{
$this->user = $user;
}
Please or to participate in this conversation.