Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Commit

Permalink
Make User.php GDPR compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
kkamara committed Aug 4, 2023
1 parent 8414388 commit 37cb641
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,48 @@
use Laravel\Sanctum\HasApiTokens;
use Soved\Laravel\Gdpr\Portable;
use Soved\Laravel\Gdpr\Contracts\Portable as PortableContract;
use Soved\Laravel\Gdpr\EncryptsAttributes;
use Soved\Laravel\Gdpr\Retentionable;

class User extends Authenticatable implements PortableContract
{
use HasApiTokens, HasFactory, Notifiable, Portable;
use HasApiTokens, HasFactory, Notifiable, Portable;
use EncryptsAttributes, Retentionable;

/**
* The attributes that should be visible in the downloadable data.
*
* @var array
*/
protected $gdprVisible = [
'first_name',
'last_name',
'email',
'created_at',
];

/**
* The attributes that should be encrypted and decrypted on the fly.
*
* @var array
*/
protected $encrypted = [];

/**
* The relations to include in the downloadable data.
*
* @var array
*/
protected $gdprWith = [];

/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'first_name',
'last_name',
'email',
'password',
];
Expand Down

0 comments on commit 37cb641

Please sign in to comment.