Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use dotenv in Laravel 5 config #12

Closed

Conversation

ryanwinchester
Copy link

No description provided.

@arcanedev-maroc
Copy link
Member

Nice, but my IDE did not know where to find this env() helper (https://github.com/illuminate/support/blob/master/helpers.php).

That's why i used the getenv() function based on the PHP dotenv repo (https://github.com/vlucas/phpdotenv)

@arcanedev-maroc arcanedev-maroc self-assigned this May 23, 2015
@ryanwinchester
Copy link
Author

@ryanwinchester
Copy link
Author

I actually thought it was a dotenv thing since it was new in L5 along with dotenv, but it's just a new helper in L5, that let's you specify a default. It's a little cleaner than having to always use ternary operators.

@arcanedev-maroc
Copy link
Member

Ok, i see, cannot fetch this helper ( https://github.com/laravel/framework/blob/5.0/src/Illuminate/Foundation/helpers.php) because is not included in composer autoload.
EDIT: My bad, now i can see it in my IDE 👍

Of course is a little bit cleaner, but the benefict of using this ternary operators is the backward compatibility with L4 and decoupled from L5.

Tnx for the link ( ^_^)b

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

Successfully merging this pull request may close these issues.

None yet

2 participants