InstallationInstallation andand SetupSetup

key

Composer Installation

Install the package using Composer:

composer require appdigidelete/account-deletion

key

Configuration

Update your .env file with database credentials and tables:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_DATABASE=your_database
DB_USERNAME=your_username
DB_PASSWORD=your_password


USER_TABLE=existing_users
DELETED_USERS_TABLE=deleted_users

installation

EmailEmail ConfigurationConfiguration

SMTP Settings

Configure your .env file with SMTP credentials:

MAIL_MAILER=smtp
MAIL_HOST=smtp.yourservice.com
MAIL_PORT=587
MAIL_USERNAME=your_e
mail@domain.com
MAIL_PASSWORD=your_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=your_email@domain.com

Clear Cache

Clear the configuration cache after making changes:

php artisan config:clear
php artisan view:clear

queue-configuration

QueueQueue ConfigurationConfiguration

key

Database Driver

Set up the database driver for your queue. Run the following commands to create the jobs table:

composer require appdigidelete/account-deletion

key

Queue Worker

Start the queue worker to process jobs:

php artisan queue:work

UsageUsage andand DependenciesDependencies

Email Functionality

The package relies on the Illuminate/Mail component to send deletion confirmation emails.

Database Setup

Ensure your database has tables for existing users and deleted users.

Framework Integration

The package integrates with the Illuminate/Support component for Laravel framework functionality.

usage-and-dependencies

Existing User

Deleted User

DatabaseDatabase SetupSetup

key

Existing Users Table

The default table name is existing_users.

key

Deleted Users Table

The default table name is deleted\_users.

key

Migrations

Start the queue worker to process jobs:

php artisan queue:work

user-deletion-process

UserUser DeletionDeletion ProcessProcess

key

User Request

The user requests account deletion through the pre-built form.

key

Email Confirmation

An email confirmation with a unique link is sent to the user.

key

User Confirmation

The user clicks the link in the email to confirm deletion.

key

Account Deletion

The user's account is deleted and data is transferred to the deleted_users table.

KeyKey TakeawaysTakeaways andand NextNext StepsSteps

Streamlined Deletion

The package simplifies account deletion for developers by providing a pre built form and automating the process.

Secure Process

Deletion requests are confirmed through email, ensuring user consent and data security.

Scalable Solution

The package is designed for integration with Laravel applications, making it suitable for projects of any size.

key-takeaways