make translation helper for laravel

This commit is contained in:
Milos Holba
2021-03-22 10:46:27 +01:00
parent c8dedd44c4
commit 61635db3db
12 changed files with 141 additions and 127 deletions
+4 -2
View File
@@ -33,10 +33,12 @@ class Language extends Model
DB::table('language_strings')
->where('lang', $language->locale)
->delete();
Cache::forget('language_strings-' . $language->locale );
});
static::updated(function() {
Cache::forget('language_strings');
static::updated(function($language) {
Cache::forget('language_strings-' . $language->locale );
});
static::created(function ($language) {