Configurations

In depth review of all the configurations available in the framework.

Application globals

These configurations define the global behaviour of the application.

debug (Boolean) Setting it to true will be more verbose in logs.

app.name (String) The name of your client application.

links.app (String) The absolute URL that links to your client application.

links.confirm (String) The absolute URL that users will be sent to confirm their email.

links.forgot_password (String) The absolute URL that users will be sent to reset their password.

links.invite (String) The absolute URL that users will be sent to accept an invite.

$app['debug'] = true;
$app['app.name'] = 'BeRest';
$app['links.app'] = 'https://app.berest.io';
$app['links.confirm'] = 'https://app.berest.io/confirm/';
$app['links.forgot_password'] = 'https://app.berest.io/reset-password/';
$app['links.invite'] = 'https://app.berest.io/accept/';
		

Redis

These configurations define how to connect to a Redis server.

redis.host (String) Address of the host.

redis.port (Integer) Port to use to connect.

$app['redis.host'] = '127.0.0.1';
$app['redis.port'] = '6379';
		

MySQL

These configurations define how to connect to a MySQL server.

mysql.host (String) Address of the host.

mysql.port (Integer) Port to use to connect.

mysql.user (String) Username to use to connect.

mysql.password (String) Password to use to connect.

mysql.db (String) Name of the database.

$app['mysql.host'] = '127.0.0.1';
$app['mysql.port'] = '3306';
$app['mysql.user'] = 'root';
$app['mysql.password'] = '123456';
$app['mysql.db'] = 'berest';
		

Mailgun

These configurations define how to connect to Mailgun API.

mailgun.key (String) Private key to connect.

mailgun.public_key (String) Public key to connect.

mailgun.domain (String) Domain to use to send emails.

$app['mailgun.key'] = 'key-xxx';
$app['mailgun.public_key'] = 'pubkey-xxx';
$app['mailgun.domain'] = 'mg.xxx.com';
		

Email

These configurations define the information to use in emails.

email.from_name (String) From name to use when sending emails.

email.from_email (String) From email to use when sending emails.

email.directory (String) Absolute path to the email templates.

$app['email.from_name'] = 'BeRest';
$app['email.from_email'] = 'v@berest.io';
$app['email.directory'] = 'ROOTDIR . '/vendors/composer/BeRest/API/src/BeRest/API/Emails';
		

Users

These configurations define the behaviour for users.

users.validate_email (Boolean) Validate emails provided by users.

users.confirm_email (Boolean) Confirm the email using a confirmation email.

users.self_signup (Boolean) Allow users to signup by themselves.

users.use_account (Boolean) Support for multi-users account.

$app['users.validate_email'] = true;
$app['users.confirm_email'] = true;
$app['users.self_signup'] = true;
$app['users.use_account'] = false;
		

Translator

translator.default_language (String) Default language to use.

translator.available_languages (Array) Array of available languages.

translator.directory (String) Absolute path to the locale files.

$app['translator.default_language'] = 'en_CA';
$app['translator.available_languages'] = ['en_CA'];
$app['translator.directory'] = ROOTDIR . '/vendors/composer/BeRest/API/src/BeRest/API/Locales';
		

Authentication

authenticate.method (Class) Authentication method to use.

$app['authenticate.method'] = BasicAuthenticate::class;