php artisan serve
command runs your website with 127.0.0.1
ip and 8000
port by default.
How can we serve with custom domain like zemna.test
for development?
You can use any name of domain only for your computer. But the best practice is use .local
or .test
domain.
In past, .dev
domain also be used many times.
But .dev
domain will be automatically redirect to https
protocol by browser.
So, use .local
or .test
domain.
Open C:\Windows\System32\drivers\etc
file, and add a new line
127.0.0.1 zemna.test
Update APP_URL
in your .env file
APP_URL=http://zemna.test
php artisan serve
command with custom domainphp artisan serve --host=zemna.test --port=80
You can access your web application with custom domain.