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(); }