i want to get my current logged user details into my hidden input fields. so i write input values like this
<input type="hidden" name="name" v-model="comment.name">
<input type="hidden" name="avatar" v-model="comment.avatar">
or i want to get directly user informations into my vuejs objects
comment: {
name: '',
avatar: '',
user_id: '',
comment: '',
status: 'Approved',
created_at: ''
},
how i get current logged user details into this object. i used this fetch method to get details
axios.get("api/userdetails").then(({ data }) => (this.users.fill(data)));
this is my controller
return auth('api')->user();
this.users.fill(data)?