Laravel 5.6 - Error passing 2 parameters in url

0
Hello, I'm trying to pass 2 parameters to my controller using url and I'm getting the following error message:

  

Missing required parameters for [Route: teacher.average_faults] [URI:   teacher / average-faults / {team} {matter}].

My view looks like this:

<a href="{{route('teacher.average_faults',[$team->id,$matter->id])}}"></a>

My controller:

public function closureTeacherAverage_Faults($team, $matter){
    $verify = Closure::find(1);
    $team = Team::find($team);
    $matter = Matter::find($matter);

    $students_ids = DB::table('student_team')->select('student_id')->where('team_id','=',$team->id)->pluck('student_id');

    $students = [];
    foreach ($students_ids as $value) {            
        $students[] = montar(Student::find($value));
    }

    return view('closure.averages_faults',compact('verify','students','matter'));
}

My web route looks like this:

Route::get('professor/average-faults/{team}{matter}',   ['as' => 'teacher.average_faults', 'uses' => 'Employee\ClosureController@closureTeacherAverage_Faults']);

If anyone can help, thank you in advance.

    
asked by anonymous 12.05.2018 / 21:18

0 answers