Skip to content

Commit

Permalink
[8.x] Adding lang_path helper function (laravel#39103)
Browse files Browse the repository at this point in the history
* adding lang_path to helpers

* Update helpers.php

* Update helpers.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
2 people authored and victorvilella committed Oct 12, 2021
1 parent 1a13265 commit fe5d3c6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Illuminate/Foundation/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,19 @@ function logger($message = null, array $context = [])
}
}

if (! function_exists('lang_path')) {
/**
* Get the path to the language folder.
*
* @param string $path
* @return string
*/
function lang_path($path = '')
{
return app('path.lang').($path ? DIRECTORY_SEPARATOR.$path : $path);
}
}

if (! function_exists('logs')) {
/**
* Get a log driver instance.
Expand Down

0 comments on commit fe5d3c6

Please sign in to comment.