protect route

This commit is contained in:
nurmuhammet committed 2024-11-06 13:52:18 +05:00
1 parent ab9bc6a270
commit 564fe508bf
6 files changed
+167 -30

No files matched your search

+9 -4
View File
@@ -4,12 +4,15 @@
use App\Http\Controllers\FetchCardHistoryController;
use App\Http\Controllers\MetricsController;
use App\Http\Controllers\ProfileController;
use App\Http\Middleware\OnlySystemUser;
use App\Modules\ApiAuth\Controllers\ApiAuthController;
use App\Modules\BaseAppEnum\Controllers\BaseAppEnumController;
use App\Modules\Branch\Controllers\BranchController;
use App\Modules\LoanOrder\Controllers\LoanOrderController;
use App\Modules\Province\Controllers\ProvinceController;
use Illuminate\Support\Facades\Route;
use Laravel\Nova\Http\Middleware\Authenticate;
use Laravel\Nova\Http\Middleware\Authorize;
/*
|--------------------------------------------------------------------------
@@ -22,11 +25,13 @@
|
*/
// Fetch card history...
Route::post('fetch-card-history', [FetchCardHistoryController::class, 'index']);
Route::middleware(['nova', Authenticate::class, Authorize::class, OnlySystemUser::class])->group(function () {
// Fetch card history...
Route::post('fetch-card-history', [FetchCardHistoryController::class, 'index']);
// Fetch loan history...
Route::post('fetch-loan-history', [FetchLoanHistoryController::class, 'index']);
// Fetch loan history...
Route::post('fetch-loan-history', [FetchLoanHistoryController::class, 'index']);
});
// Auth...
Route::post('auth/register', [ApiAuthController::class, 'register']);