0

I'm using tailwind, Laravel 8 and Breeze. After installing Breeze I would like to customize (change size, color and text) the log out button but I have no idea how to do that.

Here is the code :

<form method="POST" action="{{ route('logout') }}">

                        @csrf

    <x-dropdown-link :href="route('logout')"
           onclick="event.preventDefault();
     .closest('form').submit();">
     {{ __('Log Out') }}
     </x-dropdown-link>
</form>

and the auth.php

Route::post('/logout', [AuthenticatedSessionController::class, 'destroy'])
            ->middleware('auth')
            ->name('logout');

Thanks for your help

Rolek
  • 73
  • 6

2 Answers2

0

To begin, you should be aware that the dropdown-link is rendered using a component. When you alter the components, it may affect all pages that use that component.

You can modify that component in this file:
resources/views/components/dropdown-link.blade.php

enter image description here

amlxv
  • 1,610
  • 1
  • 11
  • 18
0

use this code in your blade file

<a href="{{ route('logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">Logout</a>
@csrf

its on working