Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Can you try this code see if it's what you want. Here the second group route it's just the <code>{gameId}</code>and then you have the <code>stats</code> group which wraps all the other routes. </p> <pre><code>Route::group(['prefix' =&gt; 'game'], function(){ Route::group(['prefix' =&gt; '{gameId}'], function(){ Route::group(['prefix' =&gt; 'stats'], function(){ Route::get('/', ['as' =&gt; 'game.stats', function ($game) { return View::make('competitions.game.allstats'); }]); Route::get('game', ['as' =&gt; 'game.stats.game', function ($game) { return View::make('competitions.game.gamestats'); }]); Route::get('reviewer', ['as' =&gt; 'game.stats.reviewer', function ($game) { return View::make('competitions.game.reviewstats'); }]); }); }); }); </code></pre> <p>And then in your views you can call them by the route name and pass the <code>gameId</code> to the route;</p> <pre><code>{{ link_to_route('game.stats','All Stats',123) }} // game/123/stats/ {{ link_to_route('game.stats.game','Game Stats',123) }} // game/123/stats/game {{ link_to_route('game.stats.reviewer','Review Stats',123) }} // game/123/stats/reviewer </code></pre> <p>Hope this helps and solves your problem.</p> <p><strong>EDIT</strong></p> <p>I just checked It should work also with <code>Route::group(['prefix' =&gt; 'game/{game}'</code> as you have tried but just make sure to pass the <code>game</code> argument when creating the route like stated above. If you have more variables to pass you can pass an array to the function.</p> <pre><code>{{ link_to_route('game.stats','All Stats',['game' =&gt; '123','someOtherVar' =&gt; '456']) }} </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload