Skip to content

Commit

Permalink
forget parameter version to disable api model binding
Browse files Browse the repository at this point in the history
  • Loading branch information
reindert-vetter committed Jul 4, 2021
1 parent a6718fe commit 017a2e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Middleware/ApiVersionControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ public function handle(Request $request, Closure $next): SymfonyResponse
->reverse()
->toArray();

$request->route()->forgetParameter('version');
$response = (new Pipeline(Container::getInstance()))
->send($request)
->through($pipes)
->then($next);

return $response;
}
}
}

0 comments on commit 017a2e1

Please sign in to comment.