$this->id, 'name' => $this->name, 'data' => $this->data]); throw new FireflyException('Could not decrypt preference #' . $this->id . '.'); } return json_decode($data); } /** * @param $value */ public function setDataAttribute($value) { $this->attributes['data'] = Crypt::encrypt(json_encode($value)); } /** * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function user() { return $this->belongsTo('FireflyIII\User'); } }