laravel 5.4路由组重定向

I have created a route group like this:

Route::group( [ 'middleware' => [ 'auth' ] ], function () {
    // instagram
    Route::get( '/hashtags', 'MyController@index' )->name( 'my.index' );
} );

When I try to access the /hashtag url when not logged in I get redirected to the /login url. How can I change this to just the / url so I don't get to see the login page?

Change the unauthenticated function in the app/Exceptions/Handler.php

protected function unauthenticated($request, AuthenticationException $exception)
{
    if ($request->expectsJson()) {
        return response()->json(['error' => 'Unauthenticated.'], 401);
    }

    return redirect()->guest(route('yourDesiredRoute'));
}

https://laracasts.com/discuss/channels/laravel/default-redirect-login-page-if-not-authenticate-in-54

Change this route in Exception\Handler.php -> unauthenticated function

return redirect()->guest(route());