I am new to PHP and Laravel. While virtualhosting with Wamp, I could specify the documentroot, servername and the port number – hence specifying the domain name. But with the command php artisan serve, I am able to specify the port address but not the domain name.
Is it possible to set the domain name?
also, what is the difference between hosting with this command and with wamp ?
n.b I am new to server side languages, sorry for asking these basics !
EDIT: I’ve used php artisan serve –host=blog.local –port=8001 but error is showing up
I’ve cleared the configuration and application cache.
Advertisement
Answer
You can explicitly define the host and the port with artisan serve command:
php artisan serve --host=somedomain.com --port=8001
Note: Remember to enable to port with your firewall.