mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Clear the settings cache on app destruction
This commit is contained in:
parent
031c9c1204
commit
6d594faae7
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
namespace Tests\Support;
|
namespace Tests\Support;
|
||||||
|
|
||||||
|
use App\Models\Setting;
|
||||||
|
|
||||||
trait InteractsWithSettings
|
trait InteractsWithSettings
|
||||||
{
|
{
|
||||||
protected Settings $settings;
|
protected Settings $settings;
|
||||||
|
@ -9,5 +11,7 @@ trait InteractsWithSettings
|
||||||
public function setUpSettings()
|
public function setUpSettings()
|
||||||
{
|
{
|
||||||
$this->settings = Settings::initialize();
|
$this->settings = Settings::initialize();
|
||||||
|
|
||||||
|
$this->beforeApplicationDestroyed(fn() => Setting::$_cache = null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue