39 lines
1.2 KiB
PHP
Executable File
39 lines
1.2 KiB
PHP
Executable File
<?php
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| API Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register API routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
| is assigned the "api" middleware group. Enjoy building your API!
|
|
|
|
|
*/
|
|
|
|
Route::middleware('auth:api')->get('/user', function (Request $request) {
|
|
return $request->user();
|
|
});
|
|
|
|
// 客户
|
|
include_once __DIR__ . '/api_customer.php';
|
|
// 店主
|
|
include_once __DIR__ . '/api_seller.php';
|
|
|
|
Route::middleware('api')
|
|
->prefix('external')
|
|
->namespace('\App\Http\Controllers\Api\External')
|
|
->group(function () {
|
|
Route::any('ali/auth_redirect', 'AliController@authRedirect');
|
|
Route::any('ali/notify_callback', 'AliController@notifyCallback');
|
|
|
|
Route::any('ali/agent_notify_callback', 'AliController@agentNotifyCallback');
|
|
Route::any('ali/agent_auth_redirect', 'AliController@agentAuthRedirect');
|
|
|
|
|
|
Route::any('wechat/event_message', 'WechatController@eventMessage');
|
|
});
|