There was an error while loading. Please reload this page.
1 parent ac1de0a commit 485decdCopy full SHA for 485decd
1 file changed
src/Filterable/Providers/FilterableServiceProvider.php
@@ -37,7 +37,8 @@ protected function registerFilterBindings(): void
37
{
38
// Bind Request class to resolve to the current request from the container.
39
// 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.
+ // Using bindIf() ensures we don't override any existing Request bindings.
41
+ // Tests can still override this by calling $app->instance(Request::class, $request).
42
$this->app->bindIf(Request::class, function ($app) {
43
return $app['request'];
44
});
0 commit comments