From 911c3e0853a6083095afc441c8aca93533a5ee4a Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Thu, 11 Jul 2024 16:24:21 +0200 Subject: [PATCH] aa --- app/CustomFuncPao.php | 11 +++++++++++ routes/web.php | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php index 6318f3af..132564ed 100644 --- a/app/CustomFuncPao.php +++ b/app/CustomFuncPao.php @@ -1744,3 +1744,14 @@ function getClienteByIdCodClienteInternet($codClienteInternet) return $clienteinGM; } + +function getClienti() { + try { + $clienti = Clientegm::all(); + + dd($clienti); + + } catch (\Exception $e) { + return null; + } +} \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index f0ed8760..6c40cce5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -2148,6 +2148,10 @@ Route::post('/pao1', function (Request $request) { dd($request->all()); }); +Route::post('/getclienti', function (Request $request) { + getClienti(); + +}); function updateCreate(Request $request) { @@ -2274,7 +2278,7 @@ function updateCreate(Request $request) $cliente = $clienteinGM; } - if ($cliente == null) { + if ($cliente === null) { $cliente = new Clientegm(); }