Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
en attente de changement
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcaussades committed Jul 22, 2024
1 parent f13846e commit d07dcb3
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 3 deletions.
5 changes: 4 additions & 1 deletion app/Http/Controllers/eventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ public function Departure(){
$sr[$i]["departureTime"] = Carbon::parse($sr[$i]["departureTime"])->format('H:i');
$sr[$i]["peopleOnBoard"] = $this->get_fp($r[$i]["id"])[0]["peopleOnBoard"];
$sr[$i]["rule"] = $this->get_fp($r[$i]["id"])[0]["flightRules"];
$sr[$i]["fp"] = null;
}
}
$sr = array_values($sr);
Expand Down Expand Up @@ -196,9 +197,11 @@ public function get_arrival_departure(){

$arrival = $this->get_general();
$departure = $this->Departure();
$atc = $this->get_atc_online();
$query = [
"arrival" => $arrival,
"departure" => $departure
"departure" => $departure,
"atc" => $atc
];
return $query;
}
Expand Down
55 changes: 55 additions & 0 deletions resources/views/plateforme/atc.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@extends("metar-base")

@section("title", "Information Air Traffic Control Ivao")

@include("navbar-metar")

@section('content')

<div class="container">
<p class="text-center">
<div class="fw-bolder fs-3 text-primary text-center text-uppercase mt-5">{{$icao}} Information</div>
</p>
</div>

<div class="container">
<div class="row">
<div class="col-md-6">
<div class="card mt-3">
<div class="card-header">
<h5 class="card-title">Metar</h5>
</div>
<div class="card-body">
<div class="text-center">
<div class="fw-bolder fs-5 text-primary text-center text-uppercase mt-5">{{$metar["metar"]}}</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card mt-3">
<div class="card-header">
<h5 class="card-title">Departure</h5>
</div>
<div class="card-body">
<div class="text-center">
<div class="fw-bolder fs-5 text-primary text-center text-uppercase mt-5">{{$atc["departure"]["count"]}}</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card mt-3">
<div class="card-header">
<h5 class="card-title">Arrival</h5>
</div>
<div class="card-body">
<div class="text-center">
<div class="fw-bolder fs-5 text-primary text-center text-uppercase mt-5">{{$atc["arrival"]["count"]}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
8 changes: 6 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -679,15 +679,19 @@
dd($encrypted, $decrypted);
})->name("crypto");

Route::get("ATC/{icao}", function (Request $request) {
Route::get("atc/{icao}", function (Request $request) {
$request->merge([
"icao" => $request->icao
]);
$request->validate([
"icao" => "required|size:4"
]);
$atconline = new eventController($request->icao);
$atc = $atconline->get_atc_online();
$atc = $atconline->get_arrival_departure();
$metar = new metarController();
$metar = $metar->metar($request->icao);
$info_atc = null;
return view("plateforme.atc", ["atc" => $atc, "icao" => $request->icao, "metar" => $metar]);


})->name("devs.atc");
Expand Down

0 comments on commit d07dcb3

Please sign in to comment.