title: Laravel - Missing required parameters for Route
body: <p>I have a problem with my routes in Laravel 7 not sure where I a, going wrong here.</p>
  <p>I have this route declaration:</p>
  <pre><code>Route::group(['prefix'=&gt;'config', 'namespace'=&gt;'Config'], static function () {
      Route::resource('id-generation', 'IDSettingsController',  ['names'=&gt;'config.id_generation'])-&gt;only(['index', 'edit', 'update']);
     
  });
  </code></pre>
  <p>Then a controller:</p>
  <pre><code>public function edit(IdSetting $setting)
      {
          return view('config.id.edit')-&gt;with(['setting'=&gt;$setting]);
      }
  </code></pre>
  <p>Then a view:</p>
  <pre><code>&lt;form method=&quot;post&quot; action=&quot;{{route('config.id_generation.update', ['id_generation'=&gt;$setting])}}&quot;&gt;
                  @method('patch')
                  @csrf
  
                  &lt;x-inputs.text-input name=&quot;prefix&quot; :model-object=&quot;$setting&quot; /&gt;
                  &lt;x-inputs.button/&gt;
  
              &lt;/form&gt;
  </code></pre>
  <p>But I keep getting errors:</p>
  <pre><code>Illuminate\Routing\Exceptions\UrlGenerationException
  Missing required parameters for [Route: config.id_generation.update] [URI: config/id-generation/{id_generation}].(View: F:\PROJECTS\PHP\app\resources\views\config\id\edit.blade.php)
  </code></pre>
  <p>In as much as I can see, I have done everything correctly. Even artisan command route:list can clearly show the route with its parameters etc.</p>
  <p>Where might I be getting it wrong.</p>
  <p>Surprisingly if i change it to {{url('config/id-generation/', $setting)}} everthing seeems to be working fine.</p>