Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make the profile page editable for users and i want to save those data after editing (vue.js + laravel)

i`m making a web application for a company and in the profile page i want user to edit details and add some more details and save them. i tried many ways and they are not working

i want user to edit these first name and last name which we get from the database after login

      <v-dialog v-model="dialog">
        <v-card>
          <v-card-title>
            <span class="headline">Edit User</span>
          </v-card-title>

          <v-card-text>
            <v-container grid-list-md>
              <v-layout wrap>
                <v-flex xs12 sm6 md4>
                  <v-text-field v-model="user.firstName" label="First Name"></v-text-field>
                </v-flex>

                <v-flex xs12 sm6 md4>
                  <v-text-field v-model="user.lastName" label="Last Name"></v-text-field>
                </v-flex>
              </v-layout>
            </v-container>
          </v-card-text>

          <v-card-actions>
            <v-spacer></v-spacer>

            <v-btn color="blue darken-1" flat>Cancel</v-btn>

            <v-btn color="blue darken-1" flat>Save</v-btn>
          </v-card-actions>
        </v-card>
      </v-dialog>
like image 753
Tharani Karunathilaka Avatar asked Nov 19 '25 14:11

Tharani Karunathilaka


1 Answers

we have to send a http request to backend and save data using the response. Refer this tutorial for more details. vuejs.org/v2/cookbook/using-axios-to-consume-apis.html

I have done using this method

like image 50
Tharani Karunathilaka Avatar answered Nov 21 '25 05:11

Tharani Karunathilaka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!