You've simply got it backwards. $balance = DB::table('data')->where('user_id' '=' $id)->sum('b...
This means that when you are migrating, you are creating a foreign key constraint and those constrai...
The Laravel portal for problem solving, knowledge sharing and community building.
The community