From 2ec15193a0ee0d924dfb3c147905e87fe8a0b33c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?= Date: Mon, 20 Jan 2025 22:44:03 +0300 Subject: [PATCH] Add server time and date endpoints to API - Introduced two new API endpoints: `/server-time` and `/server-date` in the `api.php` routes file. - Integrated `TimeDateController` to handle requests for current server time and date. - Enhanced API functionality by providing users with easy access to server time and date information. --- routes/api.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/routes/api.php b/routes/api.php index 07174bc..86575e3 100644 --- a/routes/api.php +++ b/routes/api.php @@ -3,6 +3,7 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; use App\Http\Controllers\CurrencyController; +use App\Http\Controllers\TimeDateController; /* |-------------------------------------------------------------------------- @@ -18,4 +19,9 @@ Route::get('/currency-rates', [CurrencyController::class, 'getCurrentRates']); Route::get('/currency-rates/{currencyName}', [CurrencyController::class, 'getCurrencyRateByName']); Route::get('/gold-rates', [CurrencyController::class, 'getGoldRates']); -Route::get('/gold-rates/{goldName}', [CurrencyController::class, 'getGoldRateByName']); \ No newline at end of file +Route::get('/gold-rates/{goldName}', [CurrencyController::class, 'getGoldRateByName']); + + +Route::get('/server-time', [TimeDateController::class, 'getServerTime']); +Route::get('/server-date', [TimeDateController::class, 'getServerDate']); +