A deliberately broken Laravel application. Each route below triggers a different runtime error so that logalyzer can detect, analyse, and fix them.
strtoupper(null)
config('app.custom_setting') returns null because the key does not exist.
PHP 8 raises a TypeError when null is passed to strtoupper().
File: app/Http/Controllers/DashboardController.php:17
$user->name on null
User::find($id) returns null for unknown IDs, but the controller
immediately accesses ->orders() without a null-check.
File: app/Http/Controllers/UserController.php:15
total_value / stock
Products seeded with stock = 0 cause a DivisionByZeroError
when the controller computes the per-unit cost.
File: app/Http/Controllers/ProductController.php:16
$discountAmount out of scope
$discountAmount is only assigned inside an if ($order->has_discount) block.
Orders without a discount leave it undefined, crashing the calculation below.
File: app/Http/Controllers/OrderController.php:22
revenue
The report uses SUM(revenue) in the SQL query, but the column is
actually subtotal. MySQL raises SQLSTATE 42S22.
File: app/Http/Controllers/ReportController.php:15
getInventoryDetails() undefined
The controller calls $product->getInventoryDetails(), but that method
was never implemented on the Product model.
File: app/Http/Controllers/InventoryController.php:16
storage/logs/laravel.log and proposes a fix.