File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 22
33use App \Http \Controllers \API \HealthCheckController ;
44use App \Http \Controllers \API \Speedtest \GetLatestController ;
5- use Illuminate \Http \ Request ;
5+ use Illuminate \Support \ Facades \ Artisan ;
66use Illuminate \Support \Facades \Route ;
7+ use Symfony \Component \Console \Output \BufferedOutput ;
78
89/*
910|--------------------------------------------------------------------------
1617|
1718*/
1819
19- Route::middleware ('auth:sanctum ' )->get ('/user ' , function (Request $ request ) {
20- return $ request ->user ();
20+ Route::middleware ('auth:sanctum ' )->group (function () {
21+ /**
22+ * About endpoint will return the current status of the application including it's version.
23+ *
24+ * Endpoint: /api/about
25+ */
26+ Route::get ('/about ' , function () {
27+ $ output = new BufferedOutput ();
28+
29+ Artisan::call ('about --json ' , [], $ output );
30+
31+ $ response = json_decode ($ output ->fetch (), true );
32+
33+ return response ()->json ($ response );
34+ });
2135});
2236
2337Route::get ('/healthcheck ' , HealthCheckController::class);
You can’t perform that action at this time.
0 commit comments