PHP code example of roelofr / laravel-encryption-cast

1. Go to this page and download the library: Download roelofr/laravel-encryption-cast 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/ */

    

roelofr / laravel-encryption-cast example snippets


protected $casts = [
    'phone_number' => \Roelofr\EncryptionCast\Casts\EncryptedAttribute::class
];

protected $casts = [
    'date_of_birth' => \Roelofr\EncryptionCast\Casts\EncryptedAttribute::class . ':date'
];

protected $casts = [
    'address' => \Roelofr\EncryptionCast\Casts\EncryptedAttribute::class . ':collection'
];

protected $casts = [
    'medication' => \Roelofr\EncryptionCast\Casts\EncryptedAttribute::class . ':' . \App\Casts\MedicationCast::class
];