Code Guide 2018/10/16

Configuration (.env file)

The .env file contains the application’s configurable parameters. It’s located in the root of the project and is not included in the repository because it contains sensitive data.

APP_NAME: Application name. Ex. Hitachi
APP_ENV: Application environment: local for development environment, production for production environment
APP_KEY: key in base64 for data encryption. A new key can be generated through the command php artisan key:generate.
APP_DEBUG: show detailed error messages (or not): true for development, false for production
APP_LOG_LEVEL: log level for messages in file storage/logs/laravel.log. Recommended debug.
APP_URL: full app domain url. Ex: http://www.hitachi.com
DB_CONNECTION: mysql
DB_HOST: IP database server. Ex: 127.0.0.1
DB_PORT: port database server. Ex: 3306
DB_DATABASE: database name
DB_USERNAME: database username
DB_PASSWORD: database password
MAIL_FROM_ADDRESS: e-mail address messages are sent from. Ex: user@domain.com
MAIL_FROM_NAME: sender’s name. Ex: Hitachi Website
MAIL_DRIVER: smtp
MAIL_HOST: mail server. Ex: smtp.domain.com
MAIL_USERNAME: e-mail user to send e-mails
MAIL_PASSWORD: password to send e-mails
MAIL_ENCRYPTION: encryption used by the mail server. Ex: null or tls

If the mail server has an invalid certificate (self-signed), the following values must be set up. If the certificate is valid, there is no need to set up these options:

MAIL_ALLOW_SELF_SIGNED: true
MAIL_VERIFY_PEER: false
MAIL_VERIFY_PEER_NAME: false

Storage configuration

IMAGES_STORAGE_DISK=public
IMAGES_STORAGE_WRITE_PATH=images/
IMAGES_STORAGE_READ_PATH=/storage/images/
FILES_STORAGE_DISK=private
FILES_STORAGE_WRITE_PATH=files/
FILES_STORAGE_READ_PATH=/private/files/

Default language information

DEFAULT_LOCALE=en
DEFAULT_LANGUAGE_NAME=English

Maps information

GOOGLE_MAPS_API_KEY – Gmaps API Key
GOOGLE_MAPS_COUNTRY="United Kingdom"
GOOGLE_MAPS_COUNTRY_CODE=uk

Recaptcha information

GOOGLE_RECAPTCHA_KEY – Google Recaptcha API Key
GOOGLE_RECAPTCHA_SECRET – Google Recaptcha API Secret

SASS font file to use

MIX_FONT_FILE=1

CSV export options

CSV_ENCODING= UTF-8 or Windows-1252
CSV_DELIMITER= "," or ";"