Skip to content

Conversation

@drbyte
Copy link
Contributor

@drbyte drbyte commented Dec 6, 2019

This PR allows passing a specific domain name to valet share in order to have the app be served for that domain.
Now how it works is this:

  • (NEW) if a domain name is passed, it checks whether it matches a link (which would be required for multiple domains served by same app project), and uses that
  • if a domain name is NOT passed, it looks up any links for current directory, and uses the first found link
  • else falls back to current project foldername

It also still allows passing through custom ngrok parameters if desired (ref: #112), as either the 2nd parameter (no domain name passed) or (NEW) 3rd parameter

Fixes #537

This PR allows passing a specific domain name to `valet share` in order to have the app be served for that domain.
Now how it works is this:
- (NEW) if a domain name is passed, it checks whether it matches a link (which would be required for multiple domains served by same app project), and uses that
- if a domain name is NOT passed, it looks up any links for current directory, and uses the first found link
- else falls back to current project foldername

It also still allows passing through custom ngrok parameters if desired (ref: laravel#112), as either the 2nd parameter (no domain name passed) or (NEW) 3rd parameter

Fixes laravel#537
Copy link
Collaborator

@mattstauffer mattstauffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Co-Authored-By: Matt Stauffer <mattstauffer@users.noreply.github.com>
@drbyte drbyte requested a review from mattstauffer December 11, 2019 04:22
@mattstauffer mattstauffer merged commit 7ed362f into laravel:master Dec 11, 2019
@mattstauffer
Copy link
Collaborator

🙌

@drbyte drbyte deleted the share-domain branch December 11, 2019 07:11
@fgilio
Copy link

fgilio commented Dec 23, 2019

Thanks a lot for this!

@jordanade
Copy link

Can't get this to work. Valet share always picks the first linked domain.

@lafs-cloud
Copy link

Can't get this to work. Valet share always picks the first linked domain.

Same

@laravel laravel locked as resolved and limited conversation to collaborators May 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

valet share + multiple domains served from same Laravel app

5 participants