Skip to content

Commit 485decd

Browse files
ThavarshanCopilot
andauthored
Update FilterableServiceProvider.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ac1de0a commit 485decd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Filterable/Providers/FilterableServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ protected function registerFilterBindings(): void
3737
{
3838
// Bind Request class to resolve to the current request from the container.
3939
// This ensures Filter subclasses get the active HTTP request instead of an empty one.
40-
// The rebinding allows the test suite to override with $app->instance() if needed.
40+
// Using bindIf() ensures we don't override any existing Request bindings.
41+
// Tests can still override this by calling $app->instance(Request::class, $request).
4142
$this->app->bindIf(Request::class, function ($app) {
4243
return $app['request'];
4344
});

0 commit comments

Comments
 (0)