Database Configuration

You need to configure your backend to communicate with a database for data storage.

  • Open the .env file in the backend project. If you can't find the .env file, please make sure you set your file manager to show dot files or just create a .env file at the root folder of your project.

Here is a link that shows how to enable show dot file on your server: https://www.webhostface.com/kb/knowledgebase/hidden-files-file-manager/

You can change the following variable in the .env file.

  1. APP_NAME

  2. APP_URL

  3. Database Credentials

APP_NAME="YOUR_APP_NAME"
APP_ENV=production
APP_KEY=base64:d+WkYLqdioI9w+z9kyFf85W2PidsxnusX34H0dmBVbM=
APP_DEBUG=true
APP_URL="YOUR_DOMAIN_URL"

LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE="YOUR_DATABASE_NAME"
DB_USERNAME="YOUR_DATABASE_USERNAME"
DB_PASSWORD="YOUR_DATABASE_PASSWORD"

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

TABLE_CLASS="w-full table bg-gray-100 rounded shadow overflow-hidden"
TABLE_THEAD_CLASS="bg-gray-300 text-left "
TABLE_CHECKBOX=false


FCM_SERVER_KEY="YOUR_FIREBASE_SERVER_KEY"
FCM_SENDER_ID="YOUR_FIREBASE_SENDER_ID"

Last updated