Files
portal/resources/js/views/DashBoard.vue
2020-04-27 22:39:32 +02:00

35 lines
850 B
Vue

<template>
<div class="p-4">
<div class="flex justify-between">
<h1 class="page-title">Administration</h1>
<a href="#" @click.prevent="logout" class="btn">
<svg-vue icon="logout" /> Déconnexion
</a>
</div>
<UserAdmin />
</div>
</template>
<script>
import UserAdmin from "./User/UserAdmin";
export default {
name: "DashBoard",
components: {
UserAdmin
},
methods: {
logout: function () {
axios.post('logout')
.then(res => {
if(res.status ===302 || 401) {
window.location.href = '/login'
}
}).catch(error => {
})
}
}
}
</script>