To see default content of config file please execute the following commands.
cd your-project
cat config/config.php
Default content should look like this
return [
'application' => [
'environment' => \Vegas\Constants::DEV_ENV,
'serviceDir' => APP_ROOT . '/app/services/',
'configDir' => dirname(__FILE__) . DIRECTORY_SEPARATOR,
'libraryDir' => APP_ROOT . DIRECTORY_SEPARATOR . 'lib/',
'pluginDir' => APP_ROOT . '/app/plugins/',
'moduleDir' => APP_ROOT . '/app/modules/',
'taskDir' => APP_ROOT . '/app/tasks/',
'baseUri' => '/',
'language' => 'en_US',
'view' => [
'cacheDir' => APP_ROOT . '/cache/',
'layout' => 'main',
'layoutsDir' => APP_ROOT . '/app/layouts'
]
],
...
]
Describes enviroment. Available options are \Vegas\Constants::DEV_ENV, \Vegas\Constants::PROD_ENV. When development then it should display stacktrace when error appears and every request should reload services and modules config files.
baseUriBase URI of your project
languageDefault language of project
configDirDirectory where config.php file exists
moduleDirPath for modules
pluginDirPath for plugins
serviceDirPath for services
taskDirPath for task files (scripts for CLI)
viewView configuration. Option "layout" describes the filename of main layout. Option "layoutsDir" describes path for main layout. Option "cacheDir" describes the directory for view cache files.
If you are going to use database in your project you must configure database connection also inside config.php file.
return [
'db' => [
'adapter' => 'Mysql',
'host' => 'localhost',
'dbname' => 'test_db',
'username' => 'admin',
'password' => 'qwerty'
]
...
];
Name of adapter that vegas must use to connect with SQL server. Allowed options: 'Mysql', 'Postgresql', 'Sqlite', 'Oracle'
hostMachine in network where database server work
dbnameDatabase name
usernameUser who has access to database
passwordPassword for user who has access to database