added jwt authentication token

This commit is contained in:
Abhishek Mali
2025-11-05 15:44:04 +05:30
parent dbe47a23c7
commit ccbef09484
9 changed files with 748 additions and 25 deletions

12
routes/api.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AuthController;
Route::post('/register', [AuthController::class, 'register']);
Route::post('/login', [AuthController::class, 'login']);
Route::middleware('auth:api')->group(function () {
Route::post('/logout', [AuthController::class, 'logout']);
Route::post('/refresh', [AuthController::class, 'refresh']);
});