HeartbeatController.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace App\Http\Controllers;
  3. use Illuminate\Http\Request;
  4. class HeartbeatController extends Controller
  5. {
  6. /**
  7. * Display a listing of the resource.
  8. */
  9. public function index()
  10. {
  11. //
  12. //
  13. if (file_exists(base_path('.stop'))) {
  14. $status = 503;
  15. } else {
  16. $status = 200;
  17. }
  18. return response()->json(
  19. ['createdAt' => now()],
  20. $status,
  21. [
  22. 'Content-Type' => 'application/json;charset=UTF-8',
  23. 'Charset' => 'utf-8'
  24. ],
  25. JSON_UNESCAPED_UNICODE
  26. );
  27. }
  28. /**
  29. * Store a newly created resource in storage.
  30. */
  31. public function store(Request $request)
  32. {
  33. //
  34. }
  35. /**
  36. * Display the specified resource.
  37. */
  38. public function show(string $id)
  39. {
  40. //
  41. }
  42. /**
  43. * Update the specified resource in storage.
  44. */
  45. public function update(Request $request, string $id)
  46. {
  47. //
  48. }
  49. /**
  50. * Remove the specified resource from storage.
  51. */
  52. public function destroy(string $id)
  53. {
  54. //
  55. }
  56. }