The .env
file has all the variables that Solital uses. The idea here is that by placing some information in the environment, you are protecting your application (example: access credentials that are not in a text file, protected from accidental copies), and having other less sensitive information in conventional files to facilitate copying and migration.
Solital uses the Dotenv
class to handle all environment variables. All Solital variables are loaded using the env
method. This method is already configured in the config.php
file.
But, if you want to check if a variable exists, you can use the isset()
method.
Dotenv::isset('MY_ENVIRONMENT_VARIABLE');
php vinci generate:hash
command to generate a key.APP_HASH=
ERRORS_DISPLAY=true
DB_DRIVE=
DB_HOST=
DB_NAME=
DB_USER=
DB_PASS=
SQLITE_DIR=
MAIL_DEBUG=
MAIL_HOST=
MAIL_USER=
MAIL_PASS=
MAIL_SECURITY=
MAIL_PORT=
FIRST_SECRET=first_secret
SECOND_SECRET=second_secret
To check the status of Solita, you can run the php vinci status
command. This command checks whether there are variables that have not been configured correctly.
If you don't want to use the Dotenv
class, you can use other libraries like vlucas/phpdotenv.