Skip to content

Instantly share code, notes, and snippets.

@systemseven
Created June 12, 2013 14:41
Show Gist options
  • Save systemseven/5765893 to your computer and use it in GitHub Desktop.
Save systemseven/5765893 to your computer and use it in GitHub Desktop.
This puts /api/v1 in front of all controller requests. Sort of like route grouping. Useful for API development. If api is updated you can create a v2 grouping
// Route group for API versioning
Route::group(array('prefix' => 'api/v1', 'before' => 'auth.basic'), function()
{
Route::resource('url', 'UrlController');
Route::resource('user','UserController');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment