title: how to bind multiple related parameters in one route in laravel
body: <p>I have Two related Models Anime, Episode</p>
  <p>and I have changed the RouteKeyName for both of them</p>
  <p>In Anime Model :</p>
  <pre><code>public function getRouteKeyName() 
  {
      return 'slug';
  }
  </code></pre>
  <p>In Episode Model :</p>
  <pre><code>public function getRouteKeyName()
  {
      return 'ep_num'; // episode number
  }
  </code></pre>
  <p>to view an Episode, I use this :</p>
  <p><strong>routes/web.php</strong></p>
  <pre><code>Route::get('play/{anime}/{episode}', 'EpisodeController@index');
  </code></pre>
  <p><strong>EpisodeController.php</strong></p>
  <pre><code>public function index(Anime $anime, Episode $episode)
  {
      return view('play')-&gt;with([
          'anime' =&gt; $anime,
          'episode' =&gt; $episode
      ]);
  }
  </code></pre>
  <p>for example if i have this link</p>
  <p>.../play/naruto/10</p>
  <p>then by using route model binding i will have the first episode with ep_num=10</p>
  <p>Instead I want to have the episode with ep_num=10 when</p>
  <pre><code>anime_id = $anime-&gt;id
  </code></pre>
  <p>is there any way to do this inside RouteServiceProvider</p>
  <p>i want to apply this for all the routes containing both anime and episode such as :</p>
  <pre><code>Route::delete('anime/{anime}/episode/{episode}/delete', 'EpisodeController@destroy');
  Route::get('anime/{anime}/episode/{episode}/edit', 'EpisodeController@edit');
  Route::put('anime/{anime}/episode/{episode}/edit', 'EpisodeController@update');
  </code></pre>