4
0
Fork 0
dcat-admin-user/routes/api.php

29 lines
968 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::post('reset-pwd', [AuthController::class, 'resetPwd']);
});
Route::group(['prefix' => 'user', 'middleware' => ['auth:api']], function () {
Route::get('profile', [UserController::class, 'profile']);
Route::put('profile', [UserController::class, 'update']);
});
});