-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix laravel 9 support for updated lang folder location * fix lang folder
- Loading branch information
1 parent
a5214c2
commit 65e53f8
Showing
4 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
namespace Tanmuhittin\LaravelGoogleTranslate\Helpers; | ||
|
||
|
||
class FileHelper | ||
{ | ||
public static function getFile($fileAddress) | ||
{ | ||
if (file_exists(resource_path('lang/'))) | ||
{ | ||
return resource_path('lang/' . $fileAddress); | ||
} | ||
if (file_exists(base_path('lang/'))) | ||
{ | ||
return base_path('lang/' . $fileAddress); | ||
} | ||
|
||
throw new \Exception("Language folder cannot be found"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters