PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, October 14, 2022

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

 October 14, 2022     axios, laravel, php, vue.js     No comments   

Issue

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>

Solution

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



Answered By - Tharani Karunathilaka
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,218,314

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing