add cache for languages, make function to laravel translate

This commit is contained in:
Milos Holba
2021-03-19 20:17:12 +01:00
parent ba7d6be249
commit c8dedd44c4
9 changed files with 119 additions and 580 deletions

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');
});
}
}