Skip to content

Commit 8b2cdb1

Browse files
[8.x] Adding lang_path helper function (#39103)
* adding lang_path to helpers * Update helpers.php * Update helpers.php Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent 5e56f8a commit 8b2cdb1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Illuminate/Foundation/helpers.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,19 @@ function logger($message = null, array $context = [])
483483
}
484484
}
485485

486+
if (! function_exists('lang_path')) {
487+
/**
488+
* Get the path to the language folder.
489+
*
490+
* @param string $path
491+
* @return string
492+
*/
493+
function lang_path($path = '')
494+
{
495+
return app('path.lang').($path ? DIRECTORY_SEPARATOR.$path : $path);
496+
}
497+
}
498+
486499
if (! function_exists('logs')) {
487500
/**
488501
* Get a log driver instance.

0 commit comments

Comments
 (0)