Files
admin-erahn/resources/js/Logout.vue
T
2022-01-29 19:53:45 +08:00

27 lines
943 B
Vue

<template>
<div>
<div class="hidden lg:flex items-center">
<button @click.prevent="logout()" class="bg-transparent hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-2 px-4 border border-blue-500 hover:border-transparent rounded md:invisible lg:visible xl:visible">
Log out
</button>
<button @click.prevent="logout()" class="bg-transparent hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-2 px-4 border border-blue-500 hover:border-transparent rounded md:visible lg:invisible xl:invisible">
<i class= "fas fa-sign-out-alt"></i>
</button>
</div>
</div>
</template>
<script>
export default {
props:{
csrftoken: String,
route: String,
},
methods:{
logout: function(){
this.setLogout()
document.getElementById('logout-form').submit();
}
}
}
</script>