Skip to content

Route::redirect() does not work #119

Open
@gerardnll

Description

@gerardnll

Hello, first of all. Thanks for the package!

I'm trying to redirect the home page (/) to another localized section but I'm not having any luck so far.

Route::localized(function () {
    Route::name('front.')
        ->group(function () {
            Route::redirect('/', Lang::uri('events'))->name('home');

            Route::name('events.')->group(function () {
                Route::get(Lang::uri('events'), ListEventsController::class)->name('index');
            });
        });
});

I would like to go from domain.com => domain.com/en/events but I'm not able to get it to work.

Is this supported? Am I not reading the documentation properly?

Thanks a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions