From ebc32f2fb7c6cfbaa09934b95765eda245347452 Mon Sep 17 00:00:00 2001 From: Arthur Pariente <arthur.pariente78960@gmail.com> Date: Wed, 18 Oct 2023 15:04:14 +0200 Subject: [PATCH] Add api info page --- app/Http/Controllers/Api/StatusController.php | 1 + app/Providers/RouteServiceProvider.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/Http/Controllers/Api/StatusController.php b/app/Http/Controllers/Api/StatusController.php index 2f1a869ab..6eb03cae2 100644 --- a/app/Http/Controllers/Api/StatusController.php +++ b/app/Http/Controllers/Api/StatusController.php @@ -25,6 +25,7 @@ public function __construct( public function status(): JsonResponse { return response()->json([ + 'name' => config('app.name'), 'version' => $this->versionSvc->getCurrentVersion(true), 'php' => PHP_VERSION, ]); diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index b4942d7ee..0de97afbe 100755 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -541,6 +541,8 @@ private function mapApiRoutes() 'as' => 'api.', ], function () { Route::group([], function () { + Route::get('/', 'StatusController@status'); + Route::get('acars', 'AcarsController@live_flights'); Route::get('acars/geojson', 'AcarsController@pireps_geojson');