Fix redirect issue
This commit is contained in:
parent
b62a2c3428
commit
3de8249258
3 changed files with 3 additions and 5 deletions
|
|
@ -129,8 +129,7 @@ class AccountController extends BaseController
|
|||
Auth::login($user, true);
|
||||
event(new UserSignedUp());
|
||||
|
||||
$redirectTo = Input::get('redirect_to') ?: 'invoices/create';
|
||||
|
||||
$redirectTo = Input::get('redirect_to') ? SITE_URL . '/' . ltrim(Input::get('redirect_to'), '/') : 'invoices/create';
|
||||
return Redirect::to($redirectTo)->with('sign_up', Input::get('sign_up'));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,8 +71,7 @@ class HomeController extends BaseController
|
|||
}
|
||||
|
||||
if (Auth::check()) {
|
||||
$redirectTo = Input::get('redirect_to', 'invoices/create');
|
||||
|
||||
$redirectTo = Input::get('redirect_to') ? SITE_URL . '/' . ltrim(Input::get('redirect_to'), '/') : 'invoices/create';
|
||||
return Redirect::to($redirectTo)->with('sign_up', Input::get('sign_up'));
|
||||
} else {
|
||||
return View::make('public.invoice_now');
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class AuthService
|
|||
}
|
||||
}
|
||||
|
||||
$redirectTo = Input::get('redirect_to') ?: 'dashboard';
|
||||
$redirectTo = Input::get('redirect_to') ? SITE_URL . '/' . ltrim(Input::get('redirect_to'), '/') : 'dashboard';
|
||||
|
||||
return redirect()->to($redirectTo);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue