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

Commit

Permalink
Merge pull request #6 from rzougabenoma/patch-1
Browse files Browse the repository at this point in the history
Update RouteServiceProvider.php
  • Loading branch information
Mulkave authored Nov 2, 2017
2 parents 0cd47e3 + e330048 commit bb38d83
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 bb38d83

Please sign in to comment.