Quick Note:
Half way through writing this answer, it occurred to me that you should probably use @markus.heb advice, as it is much simpler than what is included here. But, I wanted to finish the answer anyway just in case someone wants to dig a bit deeper into the framework and how some of this stuff works, good luck!
So if you have the below in your VerificationController:
public function __construct()
{
$this->middleware('auth')->only('verify');
}
Then the default auth redirect in Laravel should look like this (depending on your version of course):
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @return string
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}
So, assuming you have Auth::routes(); in your routes/web file, you can override the default get login, below:
$this->get('login', 'Auth\LoginController@showLoginForm')->name('login');
By changing the URL, like below and placing it after the Auth::routes();call. You will end up having two routes with the name login but since your custom route comes after the original, it will be used.
Route::get('/customer/login', 'Auth\LoginController@showLoginForm')->name('login');
If you are interested as to why this works:
Auth:routes()calls:
// framework Support/Facades/Auth.php
/**
* Register the typical authentication routes for an application.
*
* @param array $options
* @return void
*/
public static function routes(array $options = [])
{
static::$app->make('router')->auth($options);
}
// framework Routing/Router.php
/**
* Register the typical authentication routes for an application.
*
* @param array $options
* @return void
*/
public function auth(array $options = [])
{
// Authentication Routes...
$this->get('login', 'Auth\LoginController@showLoginForm')->name('login');
$this->post('login', 'Auth\LoginController@login');
$this->post('logout', 'Auth\LoginController@logout')->name('logout');
// Registration Routes...
if ($options['register'] ?? true) {
$this->get('register', 'Auth\RegisterController@showRegistrationForm')->name('register');
$this->post('register', 'Auth\RegisterController@register');
}
// Password Reset Routes...
if ($options['reset'] ?? true) {
$this->resetPassword();
}
// Email Verification Routes...
if ($options['verify'] ?? false) {
$this->emailVerification();
}
}