I integrated my ckeditor with ckfinder 3
that has the ability to store files on the Amazon S3
cloud.
In my ckfinder config.php
file, that is located in public/assets/plugins/ckfinder
i have hardcoded the key, secret key, bucket and region, that are needed to make connection with the cloud.
But i want to get the config items from the .env
file.
So far i tried this in ckfinder's config.php:
require $_SERVER['DOCUMENT_ROOT'].'/../bootstrap/autoload.php';
$app = require $_SERVER['DOCUMENT_ROOT'].'/../bootstrap/app.php';
var_dump($app->environment('S3_KEY');
But this fails with an error: Fatal error: Uncaught exception 'ReflectionException' with message 'Class env does not exist' in /home/vagrant/projects/dk/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 779
So the question is, how to i access environment variables outside Laravel app ?
Thank you!