Environment variables
It is often helpful to have different configuration values based on the environment where the application is running.
For example, you may wish to use a different cache driver locally than you do on your production server.
Kiaan's default resources\settings.env file contains some common configuration values that may differ based on whether your application is running locally or on a production web server. These values are then retrieved from various Kiaan configuration files within the config directory using Kiaan's env function.
Define a variable
To define a variable, it must be defined on a single line
Comments
You can define the line as a comment if preceded by "#"
Assign the value
To add a value to an existing variable or create it if it does not exist and assign the value to it.
and You can change key name of environment variable.
Check variables
To check if a variable exists, it returns true, and if it doesn't, it returns false.
Get value
Get value of variables.
use env() helper function to get value of variables.
and you can get all variables using all() method.
Delete variables
You can delete the environment variable using delete() method.
You can delete all the environment variable use destroy() method.
Load
You can also load content with a string.
and load content from file .env.
Last updated