Livewire and Auth::logout()

I have two views one is the “\layouts\app.blade.php” and the other one is “\livewire\user-profile.blade.php” which is loading into the {{$slot}} of the “app.blade.php”. in the “app.blade.php” there is a logout link which should call a method named logout in the component and log the current user out (im doing this because have no idea how the logout route works in the fortify and there is nothing about it in the documents) but it doesn’t work when it’s in the header and once I move it to the main content of the “\livewire\user-profile.blade.php” it works. I guess it’s because the component is linked to the “\livewire\user-profile.blade.php” view but how am I supposed to make this work? what are the solutions? also, I’m using Fortify for authentication scaffolding which is new and complicated enough and lacking propper documents for junior level developers as myself and once you combine it with Livewire then it becomes a mystery for us.