PHPackages                             tixelrocks/long-env - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tixelrocks/long-env

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tixelrocks/long-env
===================

A helper function that adds support for long environment variables (eg for AWS)

0.5(10mo ago)110.4kMITPHPPHP &gt;=5.5.0

Since Jul 20Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/TixelRocks/long-env)[ Packagist](https://packagist.org/packages/tixelrocks/long-env)[ Docs](https://github.com/TixelRocks/long-env)[ RSS](/packages/tixelrocks-long-env/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (8)Used By (0)

long-env
========

[](#long-env)

[![Build Status](https://camo.githubusercontent.com/95200746e5ad05c13cbae5d8555ead48753cda17c2b5d871c6c477b13dee85bf/68747470733a2f2f7472617669732d63692e6f72672f746978656c726f636b732f6c6f6e672d656e762e737667)](https://travis-ci.org/tixelrocks/long-env)[![Total Downloads](https://camo.githubusercontent.com/970f2f3cf2f0b0e18a959eb5594a5c2a452c99f6a81d94a0a8040fac6d7898cb/68747470733a2f2f706f7365722e707567782e6f72672f746978656c726f636b732f6c6f6e672d656e762f642f746f74616c2e737667)](https://packagist.org/packages/tixelrocks/long-env)[![Latest Stable Version](https://camo.githubusercontent.com/8d58881a8845087b651bdebc4bb25634706bcd5c65993aabe41f19b6793b9064/68747470733a2f2f706f7365722e707567782e6f72672f746978656c726f636b732f6c6f6e672d656e762f762f737461626c652e737667)](https://packagist.org/packages/tixelrocks/long-env)[![Latest Unstable Version](https://camo.githubusercontent.com/ae88141e6e4d37783dddf9958cd29b06c11682ecead5db8179718a489dcdce3e/68747470733a2f2f706f7365722e707567782e6f72672f746978656c726f636b732f6c6f6e672d656e762f762f756e737461626c652e737667)](https://packagist.org/packages/tixelrocks/long-env)[![License](https://camo.githubusercontent.com/2f53b8ea581107c0604aecc9e0f7a1a7330155b0d5def34700228f3abecdc6ab/68747470733a2f2f706f7365722e707567782e6f72672f746978656c726f636b732f636c6173732d636f6e7374616e74732d68656c7065722f6c6963656e73652e737667)](https://packagist.org/packages/tixelrocks/long-env)

An env() alternative that works with long multi-line environment variables in places where it's not possible to do so natively - eg. AWS Elastic Beanstalk

Imagine you want to run Laravel Passport in AWS so you need to pass your private key as a PASSPORT\_PRIVATE\_KEY environment variable but hey 1) AWS doesn't allow multi-line environment variables 2) AWS has a limit of 4096 character per environment variable.

So you end up getting an annoying error like this:

```
Service:AmazonCloudFormation, Message:Template format error: Parameter 'EnvironmentVariables' default value '[****]' length is greater than 4096.

```

Solution
========

[](#solution)

Our solution is simple, go to `config/passport.php` and replace

```
