|
|
<?php
|
|
|
namespace AukeySwrpc\Http;
|
|
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
|
|
|
|
|
class RouteServiceProvider extends ServiceProvider{
|
|
|
public function boot(){
|
|
|
parent::boot();
|
|
|
}
|
|
|
|
|
|
public function map(){
|
|
|
$this->mapWebRoutes();
|
|
|
|
|
|
$this->mapApiRoutes();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* web路由设置
|
|
|
*/
|
|
|
protected function mapWebRoutes(){
|
|
|
Route::middleware('web')
|
|
|
->namespace('Swrpc\Http\Controllers')
|
|
|
->group(__DIR__ . '/Controllers/routes.php');
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* api路由设置
|
|
|
*/
|
|
|
protected function mapApiRoutes(){
|
|
|
Route::prefix('api')
|
|
|
->middleware('api')
|
|
|
->namespace('Swrpc\Http\Controllers')
|
|
|
->group(__DIR__ . '/Controllers/routes.php');
|
|
|
}
|
|
|
} |
...
|
...
|
|