Manage Env Variables

Env file contains various settings, one row – one KEY=VALUE pair. And then, within your project code you can get those environment variables with function env('KEY').

The .env file stores configuration variables for your application and .env.example is simply an example of what might be in the .env file! You can easily rename .env.example to .env to get started.

The .env file also contains your app key which is used for encryption in your app. In Laravel, you can maintain separate configuration from your application. For example:- Your local dev environment has different database credentials than production environment. For more detail, view Laravel Documentation.

Read Documentation

# Configure Env from Backend

VaahCms provide us different env file for different environment or for different Developers. You can also create a env file of custom name. For example:- env.local, env.production, env.username

It will automatically detect your env file by App Url. If App url not found then it will fetch .env file.

Visit following url you will see the Env Variables section:

<project-url>/backend#/vaah/settings/env-variables

You can add and update env variables directly from here.

After click on Save button, you will see a Pop-up that is for confirmation.

When you click on Proceed, You will be logout and redirected to login page.