Skip to content

Commit

Permalink
Update lang_path backward compatibility with Laravel 8
Browse files Browse the repository at this point in the history
  • Loading branch information
orkhanahmadov committed Mar 1, 2023
1 parent 638c950 commit b18a2e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
if (! function_exists('lang_path')) {
function lang_path(string $path = ''): string
{
return resource_path("lang/{$path}");
if (! empty($path)) {
$path = 'lang' .DIRECTORY_SEPARATOR . $path;
}

return resource_path($path);
}
}

0 comments on commit b18a2e0

Please sign in to comment.