Skip to content

Commit

Permalink
replace collection pop() with get() accessor (#30783)
Browse files Browse the repository at this point in the history
  • Loading branch information
clementmas authored and taylorotwell committed Dec 9, 2019
1 parent 8fa46d8 commit ff807cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Illuminate/Routing/RedirectController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ public function __invoke(Request $request, UrlGenerator $url)
{
$parameters = collect($request->route()->parameters());

$status = $parameters->pop();
$status = $parameters->get('status');

$destination = $parameters->pop();
$destination = $parameters->get('destination');

$parameters->forget('status')->forget('destination');

$route = (new Route('GET', $destination, [
'as' => 'laravel_route_redirect_destination',
Expand Down

0 comments on commit ff807cc

Please sign in to comment.