Skip to content

Commit a340b7b

Browse files
committed
Fixed logout link
1 parent 8817900 commit a340b7b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

resources/views/linkstack/modules/admin-bar.blade.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,15 @@
8989
@endif
9090
<span class="display-name">admin</span></a></li>
9191
<li><a class="ab-item" href="{{ url('/studio/page') }}">Edit My Profile</a></li>
92-
<li><a class="ab-item" href="{{ route('logout') }}">Log Out</a></li>
92+
<li><a class="ab-item" onclick="submitForm()" style="cursor:pointer">Log Out</a></li>
93+
<script>
94+
function submitForm() {
95+
document.getElementById('logoutForm').submit();
96+
}
97+
</script>
98+
<form id="logoutForm" action="{{ route('logout') }}" method="post">
99+
<input type="hidden" name="_token" value="{{ csrf_token() }}">
100+
</form>
93101
</ul>
94102
</div>
95103
</li>

0 commit comments

Comments
 (0)