Support the ongoing development of Laravel.io →
posted 2 years ago
Laravel
Last updated by @eazzy007 2 years ago.
0

Do you have a column name as I'd stored in the database table? If yes, then update it to something like id as you must only use _ as special character while defining your database column names otherwise it will create problems while creating and retrieving data.

Last updated 2 years ago.
0

The table where I am retrieving data from has a column id. I populate select option value with id and I am trying to insert into another table column Team_Lead_ID.

My code is retrieving data alright. The problem is inserting the retrieved id into column Team_Lead_ID in the new table.

0

Can you share your code so that it will be easy to understand and help you in resolving your problem?

0

I have solved it. I didn't know to include it in $fillable in Model. I thought it is not necessary as it is not a direct user input. I added it to $flilable in model and it works. Thanks

0
Solution selected by @tvbeek

Sign in to participate in this thread!

Eventy

Your banner here too?

Ezekiel Okeh eazzy007 Joined 31 Mar 2022

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.