Created
October 5, 2020 02:55
-
-
Save blogcacanid/74aeb7258497874e85c31d9a705975e5 to your computer and use it in GitHub Desktop.
PegawaiView.vue - CRUD Pagination Laravel 7 Vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class='container py-4'> | |
<div class='col-md-6'> | |
<div class='card'> | |
<div class='card-header'><h3>View Pegawai</h3></div> | |
<div class='card-body'> | |
<div class='form-group'> | |
<label htmlFor='nip'>NIP</label> | |
<input type="text" class="form-control" id="nip" v-model="pegawai.nip" disabled> | |
</div> | |
<div class='form-group'> | |
<label htmlFor='nama_pegawai'>Nama Pegawai</label> | |
<input type="text" class="form-control" id="nama_pegawai" v-model="pegawai.nama_pegawai" disabled> | |
</div> | |
<div class='form-group'> | |
<label htmlFor='alamat'>Alamat</label> | |
<textarea type="text" class="form-control" id="alamat" v-model="pegawai.alamat" rows="5" disabled></textarea> | |
</div> | |
<div class='form-group'> | |
<router-link :to="{ name: 'pegawai-list' }" class="btn btn-secondary">Back</router-link> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</template> | |
<script> | |
export default { | |
data(){ | |
return { | |
pegawai:{}, | |
} | |
}, | |
created() { | |
let uri = `/api/pegawai/show/${this.$route.params.id}`; | |
this.axios.get(uri).then((response) => { | |
this.pegawai = response.data; | |
}); | |
}, | |
method: { | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment