Skip to content

Commit

Permalink
feat(users)
Browse files Browse the repository at this point in the history
  • Loading branch information
tikrack committed Jan 29, 2025
1 parent 7644db9 commit 9a5b550
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/Http/Controllers/Admin/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,12 @@ public function index()
],
]);
}

public function users()
{
$users = User::all();

return $this->success($users);
}

}
2 changes: 2 additions & 0 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

Route::prefix('admin')->name('.admin')->middleware(CheckAdminMiddleware::class)->group(function () {
Route::post('/', [AdminController::class, 'index']);
Route::post('/users', [AdminController::class, 'users']);
Route::post('/codes', [AdminController::class, 'codes']);
});
});
});
Expand Down

0 comments on commit 9a5b550

Please sign in to comment.