Playing Next Lesson In
seconds

Let's Learn AdonisJS 6 #10.0

How to Create and Fix Missing User Profiles in Your Application

In This Lesson

Learn how to create and manage user profiles in your application. This tutorial covers adding an edit profile button, setting up routes and controllers, ensuring profile creation during registration, handling existing users without profiles, and verifying

Created by
@tomgobich
Published

00:00 - Overview of User Profiles
Explanation of the user profile page, listing watched movies, and displaying name and biography.

00:13 - Adding Edit Profile Button
Adding a button for users to edit their name and biography.

00:55 - Defining the Edit Profile Route
Defining the GET route for our edit profile page that also required a user to be authenticated.

01:38 - Controller Setup
Setting up the profiles controller with the edit method.

02:06 - Ensuring Profile Creation During Registration
Creating a profile for users during the registration process.

02:50 - Handling Existing Users Without Profiles
Adding a migration to create profiles for existing users. We cover how you can remedy this situation when it also exists in your production database. However, if this is only on your local database, this step is not needed.

05:25 - Applying Our Migration
Running the migration to add missing profiles.

05:35 - Verifying Profiles in the Database
Verifying the creation of profiles in pgAdmin.

06:30 - Rendering the Edit Profile Page
Rendering the edit profile view with the user's profile information.

06:55 - Conclusion and Migration Explanation
Explanation of why the migration was needed and when it wouldn't be necessary.

Join the Discussion 0 comments

Create a free account to join in on the discussion
robot comment bubble

Be the first to comment!