Skip to content

Commit dffaec3

Browse files
authored
Merge pull request #7 from sajjadhossainshohagbd/main
Refactor: Align cache path with Laravel conventions
2 parents 39cdf85 + 4ccae6a commit dffaec3

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ composer require elegantly/laravel-translator --dev
6363
Add the following line to your `.gitignore` file:
6464

6565
```
66-
.translator.cache
66+
storage/.translator.cache
6767
```
6868

6969
Publish the configuration file:

config/translator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
* To speed up detection, all the results of the scan will be stored in a file.
152152
* Feel free to change the path if needed.
153153
*/
154-
'cache_path' => base_path('.translator.cache'),
154+
'cache_path' => storage_path('.translator.cache'),
155155
],
156156
],
157157

src/Commands/ClearCacheCommand.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
use Elegantly\Translator\Facades\Translator;
66
use Illuminate\Console\Command;
77

8-
use function Laravel\Prompts\info;
9-
108
class ClearCacheCommand extends Command
119
{
1210
public $signature = 'translator:clear-cache';
@@ -17,7 +15,7 @@ public function handle(): int
1715
{
1816
Translator::clearCache();
1917

20-
info('Cache cleared');
18+
$this->components->info('Translator cache cleared.');
2119

2220
return self::SUCCESS;
2321
}

0 commit comments

Comments
 (0)