aboutsummaryrefslogtreecommitdiff
path: root/app/RandomLog.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/RandomLog.php')
-rw-r--r--app/RandomLog.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/RandomLog.php b/app/RandomLog.php
index a90018c..f0fefb9 100644
--- a/app/RandomLog.php
+++ b/app/RandomLog.php
@@ -26,10 +26,17 @@ class RandomLog extends Model {
public $timestamps = false;
protected $fillable = ['request', 'response'];
- public static function boot() {
+ public static function boot() {
static::creating(function ($model) {
$model->created_at = $model->freshTimestamp();
});
}
+ public function setRequestAttribute($value) {
+ $value = json_decode($value, true);
+ unset($value['_token']);
+ $value = json_encode($value);
+ $this->attributes['request'] = $value;
+ }
+
}