PHP code example of tapanderasari / laravel-mysql-encrypt
1. Go to this page and download the library: Download tapanderasari/laravel-mysql-encrypt 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/ */
tapanderasari / laravel-mysql-encrypt example snippets
namespace App;
use TapanDerasari\MysqlEncrypt\Traits\Encryptable;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
use Encryptable; // <-- 1. Include trait
public array $encryptable = [ // <-- 2. Include columns to be encrypted
'email',
'first_name',
'last_name',
'telephone',
];
}