title: Showing slug instead of id for crud in Laravel 8
body: <p>im making an edit section on my laravel crud project. that when i press edit, it will redirect to the <code>edit.blade.php</code> which will call the slug instead their id. i have worked on it and it shows the error that <code>Too few arguments to function App\Http\Controllers\ProductController::edit(), 1 passed and exactly 2 expected </code></p>
  <p>my Route</p>
  <pre><code>Route::get('edit/{slug}', $url. '\productController@update');
  Route::get('edit', $url. '\productController@edit');
  </code></pre>
  <p>my ProductController::edit()</p>
  <pre><code>public function edit(Product $product, $slug)
      {
          return view('edit', compact('product'));
      }
  </code></pre>
  <p>my ProductController::update()</p>
  <pre><code>public function update(Request $request, Product $product, $slug)
      {
          Product::where('product_slug',$request-&gt;$slug)-&gt;update([
              'product_title' =&gt; $request-&gt;title,
              'product_slug'  =&gt; $request-&gt;slug,
              'product_image' =&gt; $request-&gt;image
              ]);
  
              // redirect
              return redirect('edit');
      }
  </code></pre>
  <p>any helps would be greatly appreciated,thanks in advance</p>