title: Route resource in route group with prefix in Laravel 5
body: <p>I'm trying to create a route resource in a route group:</p>
  
  <pre><code>Route::group(['middleware' =&gt; ['web', 'auth'], 'prefix' =&gt; 'template'], function() {
      Route::resource('template', 'TemplateController');
  
      Route::get('{template}/assign', 'blabla');
      Route::post('{template}/assign', 'blabla');
  
      Route::get('{template}/clone', 'blabla');
      Route::get('{template}/customizer', 'blabla');
  });
  </code></pre>
  
  <p>But now I get routes like this: <code>template.template.index</code>, <code>template.template.create</code>, etc.</p>
  
  <p>And when I change the name <strong>from</strong> <code>Route::resource('template', 'TemplateController');</code> <strong>to</strong> <code>Route::resource('/', 'TemplateController');</code>, the route look like this: <code>template..index</code>, <code>template..create</code>, etc.</p>
  
  <p>I do have a solution but then I need to create another route group without prefix.</p>
  
  <p><strong>(TL;DR;)</strong> I was wondering how to make the route resource work in a route group with prefix and have the correct route name (template.index, template.create, etc.).</p>