I have a student table with the following structure:
And a TestAuth table with this structure:
As you can see both are related to the Group table, I am trying to consult the students that belong to the same group that is associated with testAuth through this query:
$students = Student::where('group_id', Auth::user()->group_id)->get();return view('testauth/start', compact('students'));
But I get this error: