Skip to content

Dealing with subdomains #49

@owenconti

Description

@owenconti

Wayfinder Version

0.1.4

Laravel Version

12.4

PHP Version

8.4

Description

Our app uses subdomains. All of our requests always go to the current subdomain. When generating routes with Ziggy, the base URL would be the current URL so we wouldn't run into any issues (and we could generate routes without having to pass the subdomain every time).

However with Wayfinder, the subdomain route parameter is being asked for, and if not provided, the default value of $domain is used in the URL, ie:

//$domain.example.test/admin/users/01963672-46bb-72fb-8343-111053b58880

Ideally we could completely omit the subdomain from the Wayfinder route generation like we did with Ziggy.

Steps To Reproduce

Set up your routes using a domain:

Route::domain('{subdomain}.example.test')

Generate a route via Wayfinder without providing the subdomain parameter.

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