problem with user_id
Cannot add or update a child row: a foreign key constraint fails
16 Replies



You are trying to insert a row without a user_id
I want to get my user_id from the users table.

I worked in filament, but I forgot. I worked a year ago, and if you don't practice, you forget.
share the code. where is this happens? is this in a relation manager or a form? maybe you need a select for the user id? or you want the user_id from the session?
I want it to somehow, when a post is created, take the user_id that is logged in, and show my name after it.
if you're using a resource, then check this:
https://filamentphp.com/docs/3.x/panels/resources/creating-records#customizing-data-before-saving
That's how chatgpt gave me, and it still didn't work, maybe the project is compromised, I don't know
Anyway, it's a project for college, and I have to present it in 10 minutes, I don't know if I'll continue it, maybe to practice.
Wow this thread is wild. ChatGPT + Limewire ?! What a combination of old and new!
Ahahhaha
Very funny
I don't use git
It seems much more challenging to me that way, in case I make a mistake, everything will be screwed.
if I use commits or branches, I can go back to the last commit
Where is the challenge in trying to debug?
Download this rar from Limewire..... π.... Yeah, no, thanks
do as you wish
I am not a scoundrel, and I never will be.
Because I have money.
I couldn't find another file uploader, I found the first one when I searched
For the Resource, find the
CreateRecord
Page, and add a method like this: