Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
redirects now works as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
Teddy Roncin committed Aug 30, 2023
1 parent 1328d3d commit d46efb9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/Http/Controllers/Admin/PermController.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,15 @@ public function doShotgun($id) {
}

public function doUnshotgun($id) {
$redirection = redirect(route('perm.shotgun'));
if (!array_key_exists('day', Request::query())) {
$day = 1;
} else {
$day = Request::query()['day'];
if (!$day || $day < 1 || $day > 7) {
$day = 1;
}
}
$redirection = redirect(route('dashboard.perm.shotgun', ['day' => $day]));
$user = Auth::user();
$perm = Perm::find($id);
$found = false;
Expand Down

0 comments on commit d46efb9

Please sign in to comment.