PHP code example of arzeroid / laravel-model-encryptable

1. Go to this page and download the library: Download arzeroid/laravel-model-encryptable 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/ */

    

arzeroid / laravel-model-encryptable example snippets




namespace App\Models;

use Arzeroid\LaravelModelEncryptable\Encryptable;

class ActualPersonalCost extends BaseModel
{
    ...
    use Encryptable;
    
    /**
     * The attributes that should be encrypted.
     *
     * @var array
     */
    protected $encryptable = [
        'cost',
    ];

    ...
}