29 lines
831 B
PHP
29 lines
831 B
PHP
<?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'));
|
|
}
|
|
}
|