Error bringing information from the database in laravel 5.3

0

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:

    
asked by DVertel 03.11.2016 в 03:02
source

1 answer

0

Problem solved, you had to add the middleware to the routes where you were working, especially the web and the new guard that authenticated the testauth user.

    
answered by 03.11.2016 в 05:16