msztorc / laravel-env Goto Github PK
View Code? Open in Web Editor NEWManaging Laravel environment variables from the CLI
License: MIT License
Managing Laravel environment variables from the CLI
License: MIT License
Whenever I try to set a value to an empty string, like this:
$env->setValue('MAIL_USERNAME', '');
I get the following exception:
ErrorException Uninitialized string offset: 0
Often time we need to set an value to empty string, so it will be helpful if this was fixed. I think a simple
if (empty($value)) {
}
check would be sufficient at the beginning of _prepareValue();
before we check the string index.
Thanks.
Hi.
When using this package with vuejs 3 (Laravel 9 + Inertiajs + vue), on post of values to change and subsequent change of the values, a page refresh is always forced when the package is used. When turned off, everything works the way it should.
Could you please look into this?
My project depends on your package so I am unable to upgrade to laravel 9. Please add support for laravel 9
Thanks in advance :)
When comments are set on the .env (example)
# --------------------------------------------
# REQUIRED: BASIC APP SETTINGS
# --------------------------------------------
The library fails to identify them on the parse lines:
foreach ($env_lines as $line) {
if (strlen($line)) {
[$key, $val] = explode('=', (string) $line);
$this->_envVars[$key] = $this->_stripValue($val);
}
}
since there is no "$val"
Problem
When you want to give the url value to the APP_URL key or another key with the url value the results in the env file will be different.
Example
For example, you want to fill in the value https://google.com
but the result in env file will be https\://google.com
.
Cause
Once I see in the code it is caused by return preg_quote($value);
in line 143 of file Env.php.
My Temporary Solution
I change code from return preg_quote($value); to return $value;
.
I'm sorry if my English is bad and this is the first issue I raise ๐
Can you please add Laravel 10 support? Thank you.
Hey, do you plan php 8 support. Unfortunately I don't have php 7 anymore.
Thanks!
Hi, when trying to set env variable to a value with a dash, a slash will appear in front of the dash in the .env file.
i.e:
TEST_VAR=my\-test
Can you exclude the dash from being escaped?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.