If it's foreign key then you can't update it this way. Instead use detach
and attach
methods.
Otherwise it works just like that.
I thought the attach method would be used to insert new records?
Got it working! I used what you said to first detach and then attach, thanks a lot for the help!!!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community