mirror of
https://github.com/v2board/v2board.git
synced 2024-11-15 08:19:11 +08:00
20 lines
515 B
PHP
20 lines
515 B
PHP
<?php
|
|
namespace App\Http\Routes\V1;
|
|
|
|
use Illuminate\Contracts\Routing\Registrar;
|
|
|
|
class ServerRoute
|
|
{
|
|
public function map(Registrar $router)
|
|
{
|
|
$router->group([
|
|
'prefix' => 'server'
|
|
], function ($router) {
|
|
$router->any('/{class}/{action}', function($class, $action) {
|
|
$ctrl = \App::make("\\App\\Http\\Controllers\\V1\\Server\\" . ucfirst($class) . "Controller");
|
|
return \App::call([$ctrl, $action]);
|
|
});
|
|
});
|
|
}
|
|
}
|