PHP code example of waseem / laravel-data-encryption
1. Go to this page and download the library: Download waseem/laravel-data-encryption library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App;
use Illuminate\Database\Eloquent\Model;
use Waseem\Encipher\Encipher;
class User extends Model
{
use Encipher;
/**
* The attributes that should be encrypted when stored.
*
* @var array
*/
protected $encipher = [ 'email', 'name' , 'mobile'];
/**
* Optionally you can define the attributes that should be converted to camelcase when retrieve.
*
* @var array
*/
protected $camelcase = ['name'];
}