In my main application’s config/bootstrap.php, I added the following line:
Plugin::load('Corecast', ['bootstrap' => true, 'routes' => true]);
In my plugin’s config folder, I created a bootstrap.php file, and in it:
use Cake\Core\Configure;
try {
Configure::load('Corecast.corecast', 'default', false);
} catch (\Exception $e) {
exit($e->getMessage() . "\n");
}
The above call to Configure::load() is given the plugin name and the name of the configuration file, in plugin notation. My custom configuration file is named corecast.php and it is also in my plugin’s config folder.