$this->id, 'name' => $this->name, 'data' => $value]); throw new FireflyException( sprintf('Could not decrypt preference #%d. If this error persists, please run "php artisan cache:clear" on the command line.', $this->id) ); } return json_decode($data, true); } /** * @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'); } }