title: Laravel admin/user route prefix approach
body: <p>so I have to make this system for transport management. The user can log in create/update/edit all his trips. But the admin can do the same for all users. I have divided user and admin in to route prefixes:</p>
  
  <pre><code>Route::group(['prefix' =&gt; 'admin/', 'middleware' =&gt; ['auth','admin']], function(){
  Route::resource('trips', 'TripsController',
          array('except' =&gt; array('show')));}
  
  Route::group(['prefix' =&gt; 'user/', 'middleware' =&gt; ['auth', 'user']], function(){
  
  Route::resource('trips', 'TripsController',
          array('except' =&gt; array('show')));
  }
  </code></pre>
  
  <p>The problem is in every method of the TripController I have to pass route variable with the correct url (the admin request will have a 'admin' prefix, and the users will have 'user' prefix)</p>
  
  <pre><code>return View('trips.index', compact('users', 'route'));
  </code></pre>
  
  <p>The question is there a way to do this nicely or should I just pull the trips Route::resource out of the both groups so that it wouldn't have any groups? What is the correct approach here?</p>