This commit is contained in:
2022-12-02 11:52:48 +08:00
commit b134b73709
13 changed files with 587 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace Modules\Google2FA\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
protected string $moduleNamespace = 'Modules\Google2FA\Http\Controllers';
protected string $moduleName = 'Google2FA';
public function map()
{
$this->mapApiRoutes();
}
protected function mapApiRoutes()
{
Route::as(config('api.route.as'))
->domain(config('api.route.domain'))
->middleware(config('api.route.middleware'))
->namespace($this->moduleNamespace.'\Api')
->prefix(config('api.route.prefix').'/'.strtolower($this->moduleName))
->group(module_path($this->moduleName, 'Routes/api.php'));
}
}