diff --git a/app/Clientegm.php b/app/Clientegm.php index 5685f337..907e1b5e 100644 --- a/app/Clientegm.php +++ b/app/Clientegm.php @@ -6,9 +6,8 @@ use Illuminate\Database\Eloquent\Model; class Clientegm extends Model { - protected $primaryKey = 'CodClienteInternet'; // Imposta la chiave primaria corretta - public $incrementing = true; // Indica che รจ auto-incrementante - + protected $primaryKey = null; + public $incrementing = false; //protected $connection = 'mysql_test'; protected $connection = 'sqlsrv_test'; protected $table = 'T_WOO_Clienti'; diff --git a/routes/web.php b/routes/web.php index b65d6338..ab06f697 100644 --- a/routes/web.php +++ b/routes/web.php @@ -2178,8 +2178,8 @@ Route::get('/testcli', function () { $cliente->IdNazione = 227; // ITALIA $cliente->IdInternet = 68499; try { - $cliente->save(); dd($cliente); + $cliente->save(); } catch (\Throwable $th) { dd($th); }