LikeGeeks - https://likegeeks.com/dynamic-laravel-subdomain-routing/
Many websites give their users a custom subdomain for their profiles or pages, so instead of accessing the user’s profile at
http://website.com/users/50, the user can access his profile page athttp://username.website.com which is much better. In this post, we will see how to make dynamic Laravel subdomain routing easily.Configure DNS
First, you need to add an A record with an asterisk for the subdomain like this:
* IN A 192.168.1.5
You should replace the IP address with your IP address.
Configure Web server
Open apache web server configuration file httpd.conf and