Store config data serialized (#10651)

* Store config data serialized
This way we can store null, booleans, and more reliably.

* Use model to get the mutated output.

* fix whitespace and unused function

* use json_encode/decode and casts
migration to transfer

* json_encode JSON_UNESCAPED_SLASHES

* Use JSON_UNESCAPED_SLASHES.  That is only relevant if you are printing into an HTML page.

* pre-encode the seed...

* filter other fields besides config_value
This commit is contained in:
Tony Murray
2019-10-06 21:51:22 +00:00
committed by GitHub
parent a2c69cd62f
commit be04388137
8 changed files with 140 additions and 192 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ class ConfigTest extends LaravelTestCase
$key = 'testing.persist';
$query = Eloquent::DB()->table('config')->where('config_name', $key);
$query = \App\Models\Config::query()->where('config_name', $key);
$query->delete();
$this->assertFalse($query->exists(), "$key should not be set, clean database");