PHP Classes

File: apps/MS-AvailableHotels/app/Http/Controllers/HealthCheckController.php

Recommend this page to a friend!
  Classes of mohammad anzawi   PHP Hotel Booking Available   apps/MS-AvailableHotels/app/Http/Controllers/HealthCheckController.php   Download  
File: apps/MS-AvailableHotels/app/Http/Controllers/HealthCheckController.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Hotel Booking Available
Search for hotels that are available for booking
Author: By
Last change:
Date: 2 years ago
Size: 557 bytes
 

Contents

Class file image Download
<?php

namespace App\Http\Controllers;

class
HealthCheckController extends Controller
{
   
/**
     * Create a new controller instance.
     *
     * @return void
     */
   
public function __construct(){}

    public function
health() {
        return
response()->json(['status' => 'ok'], 200);
    }

    public function
info()
    {
       
$info['ms-name'] = env('APP_NAME', 'Anonymous');;
       
$info['memory_usage'] = memory_get_usage(true);
       
$info['cpu_usage'] = sys_getloadavg()[0];

        return
response()->json($info, 200);
    }
}