-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Description
Laravel Version
12.42.0
PHP Version
8.4.14
Database Driver & Version
No response
Description
Description
After updating to Laravel 12.42.0, custom routes registered using the then callback inside withRouting() result in a blank white page (no response, no error, no 404), even though the route exists and is correctly defined.
This follows the official Laravel documentation for routing customization, but the behavior appears broken after a recent composer update.
Laravel Version
12.42.0
PHP Version
PHP 8.4.14
Framework Stack
- Laravel 12
- Inertia.js v2.0
- Vue 3
Expected Behavior
The custom route should return its defined response.
Example route:
Route::get('greeting', function () {
return 'Hello World Administrator';
});
Visiting:
https://example.test/webhooks/greeting
Should return:
Hello World Administrator
Actual Behavior
The page loads as a blank white screen:
- No HTTP error
- No exception
- No 404
- No output
- No logs written
The request silently fails.
Steps To Reproduce
-
Update to Laravel 12.42.0
-
Configure routing using withRouting() as documented:
use Illuminate\Support\Facades\Route;
->withRouting(
web: DIR.'/../routes/web.php',
commands: DIR.'/../routes/console.php',
health: '/up',
then: function () {
Route::middleware('web')
->prefix('webhooks')
->group(base_path('routes/webhooks.php'));
},
)
- Create routes/webhooks.php: