Skip to content

Instantly share code, notes, and snippets.

@roopunk
Created January 26, 2016 13:53
Show Gist options
  • Select an option

  • Save roopunk/18b6bdde6d52bded4f46 to your computer and use it in GitHub Desktop.

Select an option

Save roopunk/18b6bdde6d52bded4f46 to your computer and use it in GitHub Desktop.
composer.json for Codeigniter Hook for integrating phpdotenv extension by vlucas
{
"require": {
"vlucas/phpdotenv": "^2.2"
}
}
@roopunk
Copy link
Copy Markdown
Author

roopunk commented Jan 26, 2016

All the gists in this series :
https://gist.github.com/roopunk/756b3bd1935cac710686
https://gist.github.com/roopunk/18b6bdde6d52bded4f46
https://gist.github.com/roopunk/41dac3fff458e4ea06de

To enable phpdotenv in Codeigniter :

  1. Enable composer by setting $config['composer_autoload'] = true; in application/config/config.php
  2. Add the above composer.json file inside applications. Run "composer install"
  3. Enable hooks by setting $config['enable_hooks'] = TRUE; in application/config/config.php and add the above code in application/config/hooks.php

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment