where('Status', 1); $all = json_decode(json_encode($all), true); Redis::setex($key, 600, json_encode($all)); } return $all; } protected static function boot() { parent::boot(); static::updated(function ($model) { Redis::del('RePayConfig'); }); static::deleted(function ($model) { Redis::del('RePayConfig'); }); } }