v2board/app/Http/Routes/V1/ClientRoute.php

27 lines
820 B
PHP
Raw Normal View History

2020-02-01 20:51:45 +08:00
<?php
2023-06-12 02:32:49 +08:00
namespace App\Http\Routes\V1;
2020-02-01 20:51:45 +08:00
use Illuminate\Contracts\Routing\Registrar;
class ClientRoute
{
public function map(Registrar $router)
{
$router->group([
'prefix' => 'client',
'middleware' => 'client'
], function ($router) {
2020-02-02 21:59:12 +08:00
// Client
2023-12-08 15:27:33 +08:00
if (!config('v2board.subscribe_path')) {
$router->get('/subscribe', 'V1\\Client\\ClientController@subscribe');
}
2020-02-02 21:59:12 +08:00
// App
2023-06-12 02:32:49 +08:00
$router->get('/app/getConfig', 'V1\\Client\\AppController@getConfig');
$router->get('/app/getVersion', 'V1\\Client\\AppController@getVersion');
2020-02-01 20:51:45 +08:00
});
2023-12-08 15:27:33 +08:00
if (config('v2board.subscribe_path')) {
\Route::get(config('v2board.subscribe_path'), 'V1\\Client\\ClientController@subscribe');
}
2020-02-01 20:51:45 +08:00
}
}