attributes['password'] = bcrypt($value); } public function getRoleListAttribute() { return $this->roles->lists('id')->toArray(); } }