123456789101112131415161718192021222324252627 |
- <?php
-
- use App\Http\Controllers\Api\APIController;
- use App\Http\Controllers\SessionController;
- 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 and all of them will
- | be assigned to the "api" middleware group. Make something great!
- |
- */
-
- Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
- return $request->user();
- });
-
- Route::apiResource('user', APIController::class);
- // Login
- Route::get('/login', [SessionController::class, 'index']);
- Route::post('/login', [SessionController::class, 'login']);
- // Route::apiResource('login', SessionController::class);
|