Jesse Schutt 1 minute read
February 1, 2022

Parsing ENV Boolean Values in Laravel

I've been curious how Laravel parses strings of true and false from a .env file so I did a bit of digging. Fortunately I didn't have to look too far because the documentation gives a clear picture of what is going on behind the scenes.

In short, the `env()` helper calls a function that will look for any of the following values:

If it encounters any of these values it converts them to their native php types for us!