From 90b7db8911ddd9bd551f6bd19eb737d7fe72641c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Fri, 3 Dec 2021 14:59:39 +0100 Subject: [PATCH 1/2] add ldc web checker --- app/Console/Commands/LdcWebStatusChecker.php | 78 ++++++++++++++++++++ config/ldcweb.php | 5 ++ 2 files changed, 83 insertions(+) create mode 100644 app/Console/Commands/LdcWebStatusChecker.php create mode 100644 config/ldcweb.php diff --git a/app/Console/Commands/LdcWebStatusChecker.php b/app/Console/Commands/LdcWebStatusChecker.php new file mode 100644 index 0000000..563db63 --- /dev/null +++ b/app/Console/Commands/LdcWebStatusChecker.php @@ -0,0 +1,78 @@ + 0) { + foreach ($files as $file) { + $data['logs'] = $data['logs'] + filesize($file); + } + } + + $data['code']['version'] = app()->version(); + + // Send by cURL + $url = 'https://ldc-web.ldc.fr/api/status-checker'; + $ch = curl_init($url); + $payload = ['token' => 'CE8S52Qq7stf5k8frF4T', 'datas' => json_encode($data)]; + curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_exec($ch); + curl_close($ch); + return 0; + } +} diff --git a/config/ldcweb.php b/config/ldcweb.php new file mode 100644 index 0000000..7c62d71 --- /dev/null +++ b/config/ldcweb.php @@ -0,0 +1,5 @@ + env('PROJECT_UUID') +]; From e709d18bde1ff958f80ab7668c32ba2f29be78d5 Mon Sep 17 00:00:00 2001 From: ossan KASSEGNE Date: Fri, 3 Dec 2021 15:31:34 +0100 Subject: [PATCH 2/2] Add google analytics --- resources/views/layouts/frontend/head.blade.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resources/views/layouts/frontend/head.blade.php b/resources/views/layouts/frontend/head.blade.php index 1b53a8d..d150c33 100644 --- a/resources/views/layouts/frontend/head.blade.php +++ b/resources/views/layouts/frontend/head.blade.php @@ -44,3 +44,13 @@ {{ $societe->style }} @endif + + + \ No newline at end of file