How to work with laravel sub-domain routing with laragon ?


  • | 645 points

    I cant get it working with sub domain routing with laravel.

    i tried various things .

    a sample code

    Route::group(['domain' => '{dynamic_sd}.domain.com'], function(){
          Route::get('/', function($dynamic_sd){
            die($dynamic_sd);
        });
    });
    

    but when i call url "dynamic_sd.domain.com"

    it gives error

    "This site can’t be reached"

    please tell me how to work with it.


  • administrators
    | 64704 points

    Have you already got DNS record for dynamic_sd.domain.com (in hosts file or DNS system,...)?


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.