The environment file
.env is a simple key / value list to set environment variables on your application level.
Variables that are dependent on the server environment or sensitive data, e.g. Passwords, should be stored here.
The latter (the passwords) is the reason why the file is ignored by Git and instead a sample file
pushed into the git repository.
You may use the
env() helper function to retrieve environment variables.
If the configuration files were cached,
.env is not read. Therefore you should never use the
function directly, but only in the configuration files!
All configuration files are stored in the
Receiving Configuration Variables
config function gets the value of a configuration variable.
The configuration values may be accessed using "dot" syntax, which includes the name of the file and the option you wish to get:
$timezone = config('app.timezone');
A default value may be specified and is returned if the configuration option does not exist:
$debugMode = config('app.debug', 'false');
Pletfix will cache the configuration files into a single static file automatically to speed up the boot process.
The file will be stored in
stored/cache/config.php. If you modify the configuration files under the
Pletfix will update the cache at the next browser request.
The following files are stored in the
boot folder. They will be loaded during the boot process.
bootstrap.php- Registers the bootstrapper to load the configuration and registers the Exception Handlers.
routes.php- Defines the HTTP Routing.
services.php- Binds services to the Dependency Injection.
You may edit this files to modify the boot process as you wish.
If you have installed plugins that include services, bootstraps or default routes, they will be loaded during the boot p rocess, too.
To find out what these plugins serve, look in the
.manifest folder. But do not carry out any change manually in this
folder! The files are automatically generated and changed when you register or remove plugins.
Instead, you can override the services and routes of a plugin by adding the entries in