title: resolving laravel 5.3 route name conflict
body: <p>I have this app in laravel 5.3 on my local machine that uses two <code>controllers</code></p>
  
  <blockquote>
    <p>AdminUsersController and AgentUsersController</p>
  </blockquote>
  
  <p>Now I set their <code>routes</code> in the following ways:</p>
  
  <pre><code>Route::group(['middleware' =&gt; 'admin'], function(){
  
  
    Route::get('/admin', function(){
      return view('admin.index');
    });
  
  
    Route::resource('admin/users', 'AdminUsersController');
  
    Route::resource('admin/posts', 'AdminPostsController');
  });
  
  
  Route::group(['middleware' =&gt; 'agent'], function(){
  
    Route::get('/agent', function(){
      return view('agent.index');
    });
  
    Route::resource('agent/posts', 'AgentPostsController');
  
  });
  </code></pre>
  
  <p>When I <code>list</code> the routes in this with <code>php artisan route:list</code> I get the following out come:</p>
  
  <pre><code>+--------+-----------+-------------------------+---------------+------------------------------------------------------------------------+--------------+
  | Domain | Method    | URI                     | Name          | Action                                                                 | Middleware   |
  +--------+-----------+-------------------------+---------------+------------------------------------------------------------------------+--------------+
  |        | GET|HEAD  | /                       |               | Closure                                                                | web          |
  |        | GET|HEAD  | admin                   |               | Closure                                                                | web,admin    |
  |        | GET|HEAD  | admin/posts             | posts.index   | App\Http\Controllers\AdminPostsController@index                        | web,admin    |
  |
  |        | GET|HEAD  | agent/posts             | posts.index   | App\Http\Controllers\AgentPostsController@index                        | web,agent    |
  |        | POST      | agent/posts             | posts.store   | App\Http\Controllers\AgentPostsController@store                        | web,agent    |
  </code></pre>
  
  <p>Notice that the <code>URI agent/posts</code> has the <code>name</code> <code>posts.index</code> and that the <code>URI admin/posts</code> has the <code>name</code>  <code>posts.index</code>.</p>
  
  <p>Now in my <code>blade template</code> when I added the <code>route</code> for an <code>admin user</code> like so <code>{{route('posts.index')}}</code>. I get the <code>URI mydomain/agent/posts</code> instead of <code>mydomain/admin/posts</code>. How do I let <code>route</code> in <code>blade</code> know which of the <code>URIs</code> to pick.</p>
  
  <p>I know I can also do <code>URL('/admin/posts')</code> to pick the right one, but I am wondering if using <code>route</code> method is possible. </p>