mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-23 11:39:19 -05:00
(Update) Replace Usage Of redirect()->back() 🚀
- replacing usages of `redirect()->back()` in favor of defining the named route.
This commit is contained in:
@@ -151,7 +151,7 @@ class InviteController extends Controller
|
||||
abort_unless($invite->user_id === $user->id, 403);
|
||||
|
||||
if ($invite->accepted_by !== null) {
|
||||
return redirect()->back()
|
||||
return redirect()->route('user_invites', ['slug' => $user->slug, 'id' => $user->id])
|
||||
->with($this->toastr->error('The invite you are trying to resend has already been used.', 'Whoops!', ['options']));
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ class InviteController extends Controller
|
||||
// Activity Log
|
||||
\LogActivity::addToLog("Member {$user->username} has resent invite to {$invite->email} .");
|
||||
|
||||
return redirect()->back()
|
||||
return redirect()->route('user_invites', ['slug' => $user->slug, 'id' => $user->id])
|
||||
->with($this->toastr->success('Invite was resent successfully!', 'Yay!', ['options']));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user