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

Commit bb38d83

Browse files
authored
Merge pull request #6 from rzougabenoma/patch-1
Update RouteServiceProvider.php
2 parents 0cd47e3 + e330048 commit bb38d83

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Providers/RouteServiceProvider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@ public function loadRoutesFiles($router, $namespace, $pathApi = null, $pathWeb =
3838
* @param $router
3939
* @param $namespace
4040
* @param $path
41+
* @param $prefix
4142
*
4243
* @return void
4344
*/
44-
protected function mapApiRoutes($router, $namespace, $path)
45+
protected function mapApiRoutes($router, $namespace, $path, $prefix='api')
4546
{
4647
$router->group([
4748
'middleware' => 'api',
4849
'namespace' => $namespace,
49-
'prefix' => 'api'
50+
'prefix' => $prefix // to allow the delete or change of api prefix
5051
], function ($router) use ($path) {
5152
require $path;
5253
});

0 commit comments

Comments
 (0)