File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 22
33All significant changes to this project will be documented in this file.
44
5+ ## [ 1.4.1] - 2026-01-03
6+
7+ ### Changed
8+
9+ - Added optional ` $cast parameter to global ` env()` helper to enable typed casting via ` Env::getCast()`.
10+
511## [ 1.4.0] - 2026-01-02
612
713### Changed
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ require __DIR__ . '/vendor/autoload.php';
4646
4747// ENV
4848$env = env('APP_ENV', 'production');
49+ $debug = env('APP_DEBUG', false, true);
4950
5051// Config
5152config(['app.name' => 'Codemonster']);
Original file line number Diff line number Diff line change 33use Codemonster \Env \Env ;
44
55if (!function_exists ('env ' )) {
6- function env (string $ key , mixed $ default = null ): mixed
6+ function env (string $ key , mixed $ default = null , bool $ cast = false ): mixed
77 {
8- return Env::get ($ key , $ default );
8+ return Env::getCast ($ key , $ default, $ cast );
99 }
1010}
You can’t perform that action at this time.
0 commit comments