Move redirect configs into phpvms config

This commit is contained in:
Nabeel Shahzad
2018-09-20 13:54:43 -05:00
parent 7707d8816e
commit 2e0cc10ded
6 changed files with 13 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ class LoginController extends Controller
*/
public function __construct()
{
$this->redirectTo = config('app.login_redirect');
$this->redirectTo = config('phpvms.login_redirect');
$this->middleware('guest', ['except' => 'logout']);
}

View File

@@ -52,7 +52,7 @@ class RegisterController extends Controller
$this->userService = $userService;
$this->middleware('guest');
$this->redirectTo = config('app.registration_redirect');
$this->redirectTo = config('phpvms.registration_redirect');
}
/**

View File

@@ -72,7 +72,7 @@ class DownloadController extends Controller
// Allowed to download? If not, direct to login
if (!$file->public && !Auth::check()) {
return redirect(config('app.login_redirect'));
return redirect(config('phpvms.login_redirect'));
}
$file->download_count++;

View File

@@ -17,10 +17,6 @@ return [
'locale' => env('APP_LOCALE', 'en'),
'fallback_locale' => 'en',
// Where to redirect after logging in/registration
'login_redirect' => '/dashboard',
'registration_redirect' => '/profile',
// This sends install and vaCentral specific information to help with
// optimizations and figuring out where slowdowns might be happening
'analytics' => true,

View File

@@ -15,6 +15,16 @@ return [
*/
'installed' => env('PHPVMS_INSTALLED', false),
/*
* Where to redirect after logging in
*/
'login_redirect' => '/dashboard',
/*
* Where to redirect after registration
*/
'registration_redirect' => '/profile',
/*
* The ISO "Currency Code" to use, the list is in config/money.php
*

View File

@@ -103,5 +103,4 @@ return [
'default' => 'file',
'lifetime' => 60 * 24, # 24 hours
],
];