Subdomain in Laravel und Xampp



Update Locally : \xampp\apache\conf\extra\httpd-vhosts.conf

<VirtualHost *:80>
    DocumentRoot "E:/xampp/htdocs/project_name/public"
    ServerName localhost
    ServerAlias *.localhost
    <Directory "E:/xampp/htdocs/project_name/public">
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
Then Try this routing

Route::group([
    'domain'    => '{office_name}.localhost'
],function(){
    Route::get('/', function () {
        return 'I AM OFFICE OWNER';
    });
});

Route::get('/', function () {
    return 'I AM SITE VISITOR';
});
Run with php artisan serv
Busy Bird