Add Login & Register

This commit is contained in:
R
2022-09-15 11:47:36 +07:00
parent a3b95615d7
commit 300b53942d
40 changed files with 658 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
<?php
use Illuminate\Http\Request;
use Modules\Linksehat\Http\Controllers\Api\AuthController;
/*
|--------------------------------------------------------------------------
| 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::post('otp-request', [AuthController::class, 'otpRequest']);
Route::post('login', [AuthController::class, 'login']);
Route::post('register', [AuthController::class, 'register']);
Route::middleware('auth:api')->get('/linksehat', function (Request $request) {
return $request->user();
});