For my app code it was too late to define WEBROOT as the package had already been loaded by Laravel.