Skip to content

Commit

Permalink
fix: logout
Browse files Browse the repository at this point in the history
  • Loading branch information
ah-rahimi committed Sep 30, 2023
1 parent c2ba5e7 commit b3e86cb
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,25 @@ class="fa-light fa-times"></i></button>
<div class="bottom-sidebar">
<hr>
@if (strtolower($config['logout']['method']) == 'post')
<a class="nav-link d-flex align-items-center gap-2"
onclick="document.getElementById('logout-form').submit();">
<i class="fa-light fa-sign-out-alt"></i>
<span>Logout</span>
</a>
<button onclick="document.getElementById('logout-form').submit();"
class="nav-link d-flex align-items-center gap-2">
<div class="nav-button">
<i class="fa-light fa-sign-out-alt"></i>
<span>Logout</span>
</div>
</button>

<form id="logout-form" action="{{ route($config['logout']['route']) }}" method="POST"
class="d-none">
@csrf
</form>
@else
<a class="nav-link d-flex align-items-center gap-2"
href="{{ route($config['logout']['route']) }}">
<i class="fa-light fa-sign-out-alt"></i>
<span>Logout</span>
<a href="{{ route($config['logout']['route']) }}"
class="nav-link d-flex align-items-center gap-2">
<div class="nav-button">
<i class="fa-light fa-sign-out-alt"></i>
<span>Logout</span>
</div>
</a>
@endif
</div>
Expand Down

0 comments on commit b3e86cb

Please sign in to comment.