diff --git a/app/Console/Commands/TestPao.php b/app/Console/Commands/TestPao.php index b6055f7c..40ce4c04 100644 --- a/app/Console/Commands/TestPao.php +++ b/app/Console/Commands/TestPao.php @@ -64,7 +64,7 @@ class TestPao extends Command $log .= "Articoli: \n"; - echo "Articoli: \n"; + echo "\nArticoli: \n"; $articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function ($join) { $join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo') @@ -92,12 +92,14 @@ class TestPao extends Command if ($articles) { // log the count of the articles + echo "Num Articoli: " . $articles->count(); $log .= "Quanti Articoli: " . $articles->count(); foreach ($articles as $article) { try { $strarticolo = json_encode($article, JSON_PRETTY_PRINT); + echo $strarticolo; $log .= $strarticolo; $mostra = false; @@ -208,8 +210,9 @@ class TestPao extends Command } } } catch (\Exception $e) { + echo "Error: " . $e->getMessage(); - // $log .= $e->getMessage(); + $log .= $e->getMessage(); } } }