errors handled in the correct log file

This commit is contained in:
Clément
2025-05-12 16:46:31 +02:00
committed by PRIBYLSKI
parent 98e9a59d92
commit 2c4e7fc6b7
2 changed files with 7 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ class BilletController extends Controller
try {
$billets = Billet::all();
} catch (\Illuminate\Database\QueryException $e) {
Log::error('Erreur accès à la base de donnée');
Log::channel('projectError')->error('Erreur d\'accès à la base de données');
return view('errors.unavailable');
}
return view('index', compact('billets'));