big = DB::table('marks') ->select(DB::raw('sum(marks.tamil,marks.english,marks.maths,marks.science,marks.social')) ->where('marks.user_id',$users->id) ->first();
I suggest you to try below query
$marks = DB::table('marks')->where('user_id' '=' $id)->sum('marks');
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community