Urgent: Eloquent `updateOrCreate` throwing 'Column not found' error โ critical Laravel development issue!
0
I'm completely stuck on a critical Laravel development issue where Laravel eloquent's updateOrCreate method is throwing a 'Column not found' error for 'user_id' during lookup. This is despite 'user_id' definitely existing in the products table and all migrations being run.
Here's the error log I'm seeing:
Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_id' in 'where clause' (SQL: select * from `products` where `user_id` = 5 AND `sku` = 'PROD-XYZ' limit 1)I've been trying to fix this for hours. Any Laravel experts out there who can help urgently with a quick fix?
0 Answers
No answers yet.
Be the first to provide a helpful answer!
Your Answer
You must Log In to post an answer and earn reputation.
Hot Discussions
1
Better ISP finder data?
182 Views
5
ISP finder not working!
162 Views