mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-24 03:18:13 -05:00
21 lines
553 B
PHP
21 lines
553 B
PHP
|
<?php
|
||
|
namespace App\Http\Routes\V1;
|
||
|
|
||
|
use Illuminate\Contracts\Routing\Registrar;
|
||
|
|
||
|
class ServerRoute
|
||
|
{
|
||
|
public function map(Registrar $router)
|
||
|
{
|
||
|
$router->group([
|
||
|
'prefix' => 'server',
|
||
|
'middleware' => '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]);
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
}
|