28 lines
897 B
PHP
28 lines
897 B
PHP
<?php
|
|
|
|
namespace Peidikeji\User\Http\Api;
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::group([
|
|
'middleware' => ['api'],
|
|
'prefix' => 'api',
|
|
], function () {
|
|
Route::group(['prefix' => 'auth'], function () {
|
|
Route::post('login', [AuthController::class, 'login']);
|
|
Route::post('register', [AuthController::class, 'register']);
|
|
|
|
Route::post('login-by-sms', [AuthController::class, 'loginBySms']);
|
|
|
|
Route::post('login-by-wxmini', [AuthController::class, 'loginByWxMini']);
|
|
Route::post('wx-bind-phone', [AuthController::class, 'wxbindPhone']);
|
|
|
|
Route::post('reset', [AuthController::class, 'reset']);
|
|
});
|
|
|
|
Route::group(['prefix' => 'user', 'middleware' => ['auth:api']], function () {
|
|
Route::get('profile', [UserController::class, 'profile']);
|
|
Route::put('profile', [UserController::class, 'update']);
|
|
});
|
|
});
|