Demo Laravel 6 to show subdomains for every user, so user can register with subdomain "my-company", and their own URL will become my-company.[main_project].com
Project is partly generated with QuickAdminPanel
Front-end theme is Listing by Colorlib
- Clone the repository with git clone
- Copy .env.example file to .env and edit database credentials there
- Run composer install
- Run php artisan key:generate
- Run php artisan migrate --seed (it has some seeded data for your testing)
- That's it: launch the main URL
- If you want to login, click
Login
on top-right and use credentials admin@admin.com - password - To configure subdomains, search for your web-server documentation, example
Homestead.yaml
snippet below:
sites:
- map: company1.project.test
to: /home/vagrant/Code/project/public
- map: company2.project.test
to: /home/vagrant/Code/project/public
- map: project.test
to: /home/vagrant/Code/project/public
Basically, feel free to use and re-use any way you want.
- Check out our adminpanel generator QuickAdminPanel
- Read our Blog with Laravel Tutorials
- FREE E-book: 50 Laravel Quick Tips (and counting)
- Subscribe to our YouTube channel Laravel Business
- Enroll in our Laravel Online Courses