Skip to content

Commit

Permalink
Merge pull request #155 from davisvagris/add_redirect_new_query
Browse files Browse the repository at this point in the history
Add new redirect match
  • Loading branch information
exabyssus committed Jul 12, 2019
2 parents c0dc87f + db58769 commit 1b8b6fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Middleware/ArboryRouteRedirectMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function handle($request, Closure $next)
{
$redirect = Redirect::query();

$redirect->where('from_url', $request->url());
$redirect->whereIn('from_url', [$request->url(), $request->path()]);
$redirect->orWhere('from_url', 'LIKE', '_'.$request->path().'_');

$redirect = $redirect->first(['to_url']);
Expand Down

0 comments on commit 1b8b6fb

Please sign in to comment.