Giter Club home page Giter Club logo

Comments (10)

mattstauffer avatar mattstauffer commented on July 21, 2024 17

You can manually add a subdomain, if you'd like:

cd Sites/mergency
valet link burger.mergency
valet link coffee.mergency
valet link tea.mergency

Since I've run valet park on the Sites directory, this directory is now serving all of the following URLs:

  • mergency.dev
  • burger.mergency.dev
  • coffee.mergency.dev
  • tea.mergency.dev

from valet.

adamwathan avatar adamwathan commented on July 21, 2024 11

@MehmetNuri, it should just work, don't need to configure anything. If you have a site available at my-app.dev, foo.my-app.dev will already route to that project automatically.

from valet.

mattstauffer avatar mattstauffer commented on July 21, 2024 8

@jdavidbakr 👍 Thought you might say that, but wanted to expose this option in here in case it solved your or others' problems.

from valet.

jdavidbakr avatar jdavidbakr commented on July 21, 2024 4

@mattstauffer - yeah, but in my case, I am using the subdomains as a user-level identifier, so ideally I'd like to be able to add subdomains while playing with it that are not necessarily persistent and that I don't have to go in and create the link every time I need a new one. The solution of changing the server.php setup is working great, but it would be nice to have this configurable somehow so it doesn't get overwritten if I pull an update to valet.

from valet.

xt9 avatar xt9 commented on July 21, 2024 3

@mattstauffer I've tried that before with little luck, but this time around it worked. Thanks :) I rarely use more than 2 subdomains, but adding some kind of wildcard support could be nice.

from valet.

antonioribeiro avatar antonioribeiro commented on July 21, 2024 1

Just sent a PR to allow dynamic/wildcard subdomains: #267.

from valet.

xt9 avatar xt9 commented on July 21, 2024

This would save me some headache as well. We're also using subdomain groups.

from valet.

neronmoon avatar neronmoon commented on July 21, 2024

👍 to allow wildcards

from valet.

MehmetNuri avatar MehmetNuri commented on July 21, 2024

How i can route subdomains dynamic with valet?

from valet.

MehmetNuri avatar MehmetNuri commented on July 21, 2024

if you want support multi domain use this code

ln -s ~/Projects/directory  ~/.valet/Sites/domain_name

Example:

ln -s ~/Projects/laravel  ~/.valet/Sites/taylor

And change route file

Route::group(['domain' => 'laravel.app'], function()
{
    Route::get('/', function () {
        return "Main Domain";
    });
});


Route::group(['domain' => 'taylor.app'], function()
{
    Route::get('/', function () {
        return "Taylor Domain";
    });
});


//or 


Route::group(['domain' => '{domain}.{tld}'], function ()
{
    Route::get('/', function () {
        return "Taylor Domain";
    });
});

In this project, project name is laravel , main domain is laravel.app and taylor domain is taylor.app

Note: I don't use .dev domain. If you are use default valet settings, your domains are laravel.dev and taylor.dev

from valet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.