1. Go to this page and download the library: Download crumbls/sealcraft 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/ */
crumbls / sealcraft example snippets
use Crumbls\Sealcraft\Casts\Encrypted;
use Crumbls\Sealcraft\Concerns\HasEncryptedAttributes;
class Patient extends Model
{
use HasEncryptedAttributes;
protected $casts = [
'ssn' => Encrypted::class,
'dob' => Encrypted::class,
'diagnosis' => Encrypted::class,
];
}
use Crumbls\Sealcraft\Casts\Encrypted;
use Crumbls\Sealcraft\Casts\EncryptedJson;
use Crumbls\Sealcraft\Concerns\HasEncryptedAttributes;
class Patient extends Model
{
use HasEncryptedAttributes;
protected $casts = [
'ssn' => Encrypted::class,
'history' => EncryptedJson::class,
];
}
$patient->history = [
'conditions' => ['asthma', 'hypertension'],
'allergies' => [
['substance' => 'penicillin', 'severity' => 'severe'],
],
'notes' => 'no recent flares',
];