BobaFett's avatar

Adding Profile Fields Customization, Can Save but doesn't pull in age on page refresh.

Getting up to speed with Due Following this tutorial I can save the age to the database but on refresh it's blank. Is there a step not documented to pull in age with Vue? https://spark.laravel.com/docs/1.0/adding-profile-fields thx

0 likes
1 reply
BobaFett's avatar
BobaFett
OP
Best Answer
Level 1

ok, I'm adding company data and caught some areas that still referenced age in my /resources/assets/js/components/settings/profile/update-company-information.js under ready where it loads the values , now I'm up and running.

Vue.component('update-company-information', {
    props: ['user'],

    data() {
        return {
            form: new SparkForm({
                companyname: '',
                companyaddress: ''
            })
        };
    },

    ready() {
        this.form.companyname = this.user.companyname;
        this.form.companyaddress = this.user.companyaddress;
    },

    methods: {
        update() {
            Spark.put('/settings/profile/details', this.form)
                .then(response => {
                    this.$dispatch('updateUser');
                });
        }
    }
});

Please or to participate in this conversation.