Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SergioGregorutti's avatar

boot method of AppServiceProvider.php not firing on prod environment

Hi all,

Im using the boot method of "app/Providers/AppServiceProvider.php" to set some config variables that I need to use on the site.

For some reason this works fine on my local environment, but in my production environment the method is not firing (I use Digital Ocean and Forge).

Any ideas of what is the problem?

This is the code:

public function boot(Request $request, Config $config)
{
    $domain = $request->root();
    dd($domain);
}
0 likes
3 replies

Please or to participate in this conversation.