title: Missing required parameters for [Route: questions.update] pass 2 parameters in the url
body: <p>guys i have a problem when passing two parameters in the url that is in file <code>web.php</code></p>
  <p>That's my error
  <a href="https://i.stack.imgur.com/0tlZp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0tlZp.png" alt="" /></a></p>
  <p>I used</p>
  <p><code>Route::resource('/exams/{exam}/questions', 'Backend\QuestionController');</code></p>
  <p>to define the default routes.</p>
  <p>In the terminal looks like:</p>
  <pre><code>|        | PUT|PATCH | exams/{exam}/questions/{question}      | questions.update   | App\Http\Controllers\Backend\QuestionController@update                 | web        |
  |        |           |                                        |                    |                                                                        | auth       |
  |        | DELETE    | exams/{exam}/questions/{question}      | questions.destroy  | App\Http\Controllers\Backend\QuestionController@destroy                | web        |
  |        |           |                                        |                    |                                                                        | auth       |
  |        | GET|HEAD  | exams/{exam}/questions/{question}/edit | questions.edit     | App\Http\Controllers\Backend\QuestionController@edit                   | web        |
  |        |           |                                        |                    |                                                                        | auth       |
  </code></pre>
  <p>And to redirect, it is written this way</p>
  <pre><code>&lt;a href=&quot;{{ route('questions.edit', [ $exams-&gt;id, $question-&gt;id ]) }}&quot;class=&quot;btn btn-warning btn-sm&quot;&gt;&lt;i class=&quot;far fa-edit&quot;&gt;&lt;/i&gt;&lt;/a&gt;
  </code></pre>
  <p>And the <code>Controller.php</code></p>
  <pre><code> public function edit(Exam $exams, Question $questions, Category $category){
          return view('question.edit', compact( 'exams' ,'questions', 'category'));
      }
  
      public function update(QuestionUpdateRequest $request, $id){
          $questions = Question::find($id);
          $questions-&gt;description = $request-&gt;get('description');
          $questions-&gt;iframe = $request-&gt;get('iframe');
          $questions-&gt;image = $request-&gt;get('image');
  
          $questions-&gt;exam_id = $request-&gt;get('exam_id');
          $questions-&gt;category_id = $request-&gt;get('category_id');
          $questions-&gt;save();
          return redirect()-&gt;route('question.index', $questions-&gt;exam_id);
      }
  </code></pre>
  <p>But I can't understand why it fails, if I'm already passing the parameters indicated by the url.</p>
  <p>Also add the edit view</p>
  <pre><code>&lt;form action=&quot;{{ route('questions.update', $questions-&gt;id ) }}&quot; method=&quot;POST&quot; enctype=&quot;multipart/form-data&quot;&gt;
     {{--/exams/{{$exams-&gt;id}}/questions--}}
      &lt;div class=&quot;form-group&quot;&gt;
          {{--&lt;input type=&quot;hidden&quot; name=&quot;question_id&quot; value=&quot;{{$questions-&gt;id}}&quot;&gt;--}}
          &lt;label for=&quot;description&quot;&gt;Descripcion de la pregunta*&lt;/label&gt;
          &lt;textarea name=&quot;description&quot; type=&quot;text&quot;
                    class=&quot;form-control&quot; id=&quot;description&quot;
                    aria-describedby=&quot;descriptionHelp&quot;
                    placeholder=&quot;Inserte la pregunta&quot;&gt;{{ old('description', $questions-&gt;description) }}&lt;/textarea&gt;
          &lt;small id=&quot;descriptionHelp&quot;
                 class=&quot;form-text text-muted&quot;&gt;Escribe la descripcion de la pregunta.&lt;/small&gt;
      &lt;/div&gt;
      &lt;div class=&quot;form-group&quot;&gt;
          &lt;label for=&quot;iframe&quot;&gt;Video asociado *&lt;/label&gt;
          &lt;textarea name=&quot;iframe&quot; type=&quot;text&quot;
                    class=&quot;form-control&quot; id=&quot;iframe&quot;
                    aria-describedby=&quot;iframeHelp&quot;
                    placeholder=&quot;Inserte la URL del video&quot;&gt;{{ old('iframe', $questions-&gt;iframe) }}&lt;/textarea&gt;
          &lt;small id=&quot;iframeHelp&quot; class=&quot;form-text text-muted&quot;&gt;Inserta la url del video.&lt;/small&gt;
      &lt;/div&gt;
  
      &lt;div class=&quot;form-group d-flex flex-column&quot;&gt;
          &lt;label for=&quot;image&quot;&gt;Imagen asociada&lt;/label&gt;
          &lt;input name=&quot;image&quot; type=&quot;file&quot; class=&quot;py-1&quot;&gt;
      &lt;/div&gt;
      &lt;div class=&quot;form-group&quot;&gt;
          &lt;label for=&quot;category&quot;&gt;A que categoria pertenece&lt;/label&gt;
          &lt;select name=&quot;category_id&quot; class=&quot;form-control form-control-lg&quot; id=&quot;category_id&quot;&gt;
              @foreach($category as $category)
                  &lt;option value=&quot;{{ $category-&gt;id }}&quot;&gt;{{ $category-&gt;name }}&lt;/option&gt;
              @endforeach
          &lt;/select&gt;
          &lt;small id=&quot;selectHelp&quot; class=&quot;form-text text-muted&quot;&gt;Elige una categoria.&lt;/small&gt;
      &lt;/div&gt;
      &lt;hr /&gt;
      @CSRF
      @method('PUT')
      &lt;button type=&quot;submit&quot; class=&quot;btn btn-primary&quot;&gt;Guardar pregunta&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>