add cache for languages, make function to laravel translate

This commit is contained in:
Milos Holba
2021-03-19 19:58:13 +01:00
parent ba7d6be249
commit 2e9112d110
10 changed files with 121 additions and 582 deletions
+10
View File
@@ -2,6 +2,7 @@
namespace App;
use Illuminate\Support\Facades\Cache;
use Illuminate\Database\Eloquent\Model;
class LanguageString extends Model
@@ -14,5 +15,14 @@ class LanguageString extends Model
protected $fillable = ['value' ,'key', 'lang'];
protected static function boot()
{
parent::boot();
static::updated(function() {
dd('test');
// Cache::forget('language_strings');
});
}
}