AnonSec Team
Server IP : 103.11.96.170  /  Your IP : 18.116.28.60
Web Server : Microsoft-IIS/10.0
System : Windows NT WIN-F6SLGVICLOP 10.0 build 17763 (Windows Server 2016) AMD64
User : elibrary.unsap.ac.id ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF
Directory (0777) :  D:/localhost/trash/routes/user/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : D:/localhost/trash/routes/user/api.php
<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\User\AuthController;
use App\Http\Controllers\Api\User\ProfileController;
use App\Http\Controllers\Api\User\ChangePasswordController;
use App\Http\Controllers\Api\User\ChangePhoneController;
use App\Http\Controllers\Api\User\TransactionController;
use App\Http\Controllers\Api\User\WasteBankController;

Route::prefix('user')->group(function () {
    Route::post('sign-in', [AuthController::class, 'signIn']);
    Route::post('sign-up', [AuthController::class, 'signUp']);

    // Protected routes
    Route::middleware(['auth:sanctum', 'api.user'])->group(function () {
        Route::post('sign-out', [AuthController::class, 'signOut']);

        Route::get('otp', [AuthController::class, 'requestOtp']);
        Route::post('otp/verify', [AuthController::class, 'verifyOtp']);
        Route::post('change/password/verify', [ChangePasswordController::class, 'changePassword']);

        Route::middleware(['api.otp'])->group(function () {
            Route::get('profile', [ProfileController::class, 'show']);
            Route::post('profile', [ProfileController::class, 'update']);

            Route::apiResource('transactions', TransactionController::class);

            Route::get('waste-bank', WasteBankController::class);

            Route::post('change/phone', [ChangePhoneController::class, 'changePhone']);
            Route::post('change/password', [ChangePasswordController::class, 'requestChangePassword']);
        });
    });
});

AnonSec - 2021