Getting the Application Bootstrap File

Problem

You want to know the application bootstrap file.

Solution

Use the App::getBootstrapFile().

This returns the full path to the bootstrap file.

echo App::getBootstrapFile();

Will output something like.

/apps/example/vendor/laravel/framework/src/Illuminate/Foundation/start.php

Discussion

This is a low-level method.

You can see where this file is loaded in Understanding the Request Lifecycle. In The Booting Steps, it's the block right after "Starts Application" labeled "laravel/start.php".

comments powered by Disqus