承接 chriswillerton/encryptable 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

chriswillerton/encryptable

Composer 安装命令:

composer require chriswillerton/encryptable

包简介

Trait for use with Laravel 5 models allowing easy encryption/decryption of attributes.

README 文档

README

A trait for use with Laravel 5 models allowing easy encryption/decryption of attributes.

Installation

Add the following to the composer.json file in your project:

"chriswillerton/encryptable": "1.*"

or you can run the below on the command line in the root of your project:

composer require "chriswillerton/encryptable" "1.*"

Setup

To get started, add the trait to the model.

You also need to add an array detailing which attributes should be encrypted. Add this as a property on your model called $encryptedAttributes.

use ChrisWillerton\Encryptable\Encryptable;

class YourModel extends Eloquent
{
    use Encryptable;

    protected $encryptedAttributes = [
        'first_name',
        'surname',
        'email_address'
    ];

Notes

As this uses the encryption that ships with Laravel, please ensure you have set an app key before using this, otherwise your encrypted attributes will not be secure. Additionally, do not lose your app key, or you will not be able to decrypt your attributes.

Any issues decrypting attributes will be added to the Laravel log file, so if things aren't working as expected then check here first for details about the problem.

统计信息

  • 总下载量: 37
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固