Skip to content
Advertisement

values are not inserting in profile table

JavaScript

This is the User model

JavaScript

This is the UserProfile model

JavaScript

This is the Country model

JavaScript

This is the UserContrller

JavaScript

This is the create view

I have used this code for inserting values into two tables one table is user table and second userprofile table using relationships.In user table values are inserting successfully but values are not inserting in profile table.

Advertisement

Answer

try this create() function ref link https://laravel.com/docs/5.7/eloquent-relationships#the-create-method

JavaScript

full controller will be

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement