mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 01:11:46 +08:00 
			
		
		
		
	split router
This commit is contained in:
		
							
								
								
									
										19
									
								
								app/Http/Routes/ServerRoute.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								app/Http/Routes/ServerRoute.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| <?php | ||||
| namespace App\Http\Routes; | ||||
|  | ||||
| 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\\Server\\" . ucfirst($class) . "Controller"); | ||||
|                 return \App::call([$ctrl, $action]); | ||||
|             }); | ||||
|         }); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user