Skip to content

Commit 3bb6cfd

Browse files
committed
support laravel 11✅
1 parent 2362184 commit 3bb6cfd

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"require": {
1717
"php": ">=8.0",
1818
"stichoza/google-translate-php": "^5.1",
19-
"laravel/framework": "9.*|10.*"
19+
"laravel/framework": "9.*|10.*|11.*"
2020
},
2121
"autoload": {
2222
"psr-4": {

src/Services/TranslateService.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ private function existsLocalLangDir(): void
101101
{
102102
$path = $this->getTranslateLocalPath();
103103

104-
throw_if(!File::isDirectory($path), ("lang folder '$this->translate_from' not Exist !"));
104+
throw_if(
105+
!File::isDirectory($path),
106+
("lang folder $this->translate_from not Exist !" . PHP_EOL . ' Have you run `php artisan lang:publish` command before?')
107+
);
105108
}
106109

107110
private function existsLocalLangFiles(): void
@@ -121,4 +124,4 @@ private function getTranslateLocalPath(): string
121124
{
122125
return lang_path(DIRECTORY_SEPARATOR . $this->translate_from);
123126
}
124-
}
127+
}

0 commit comments

Comments
 (0)