Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Commit

Permalink
Update RouteServiceProvider.php
Browse files Browse the repository at this point in the history
Adding the possibility of changing or the deleting of the api prefix
  • Loading branch information
rzougabenoma authored Oct 15, 2017
1 parent 1554f1f commit e330048
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,16 @@ public function loadRoutesFiles($router, $namespace, $pathApi = null, $pathWeb =
* @param $router
* @param $namespace
* @param $path
* @param $prefix
*
* @return void
*/
protected function mapApiRoutes($router, $namespace, $path)
protected function mapApiRoutes($router, $namespace, $path, $prefix='api')
{
$router->group([
'middleware' => 'api',
'namespace' => $namespace,
'prefix' => 'api'
'prefix' => $prefix // to allow the delete or change of api prefix
], function ($router) use ($path) {
require $path;
});
Expand Down

0 comments on commit e330048

Please sign in to comment.