Skip to content

Commit

Permalink
Migliorata la stampa dell'errore in caso di validazione errata con tu…
Browse files Browse the repository at this point in the history
…tti gli attributi del model usando ->toJson(JSON_PRETTY_PRINT) del model.
  • Loading branch information
lopadova committed May 24, 2022
1 parent b37fe54 commit d2040c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Validable.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function validate()
if (config('laravel-validable.debug')) {
Log::debug('Errore durante la validazione del model \'' . $this->getTable() . '\' in \'' . ($this->id > 0 ? 'update' : 'create') . '\' lanciato su evento saving del model.');
Log::debug('Attributi del model:');
Log::debug(implode(PHP_EOL, $this->attributesToArray()));
Log::debug($this->toJson(JSON_PRETTY_PRINT));
Log::debug('Errori di validazione:');
Log::debug($this->getErrors());
Log::debug('StackTrace:'.PHP_EOL);
Expand Down

0 comments on commit d2040c3

Please sign in to comment.