mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-13 16:55:01 +00:00
39 lines
1.0 KiB
PHP
39 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* App\Setting
|
|
*
|
|
* @property int $id
|
|
* @property string $name
|
|
* @property string|null $value
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Setting newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Setting newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Setting query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereName($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereValue($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class Setting extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
protected static function boot()
|
|
{
|
|
parent::boot();
|
|
|
|
static::updated(function($setting) {
|
|
if($setting->name === 'language') {
|
|
Cache::forget('default_language');
|
|
}
|
|
});
|
|
}
|
|
}
|