Streamline User Deletion with Laravel Account Deletion
This Composer package automates account deletion in Laravel, providing a pre-built form and efficient process for developers.
InstallationInstallation andand SetupSetup
InstallationInstallation andand SetupSetup
Composer Installation
Install the package using Composer:
composer require appdigidelete/account-deletion
Configuration
Update your .env file with database credentials and tables:
DB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_DATABASE=your_databaseDB_USERNAME=your_usernameDB_PASSWORD=your_passwordUSER_TABLE=existing_usersDELETED_USERS_TABLE=deleted_users
EmailEmail ConfigurationConfiguration
EmailEmail ConfigurationConfiguration
SMTP Settings
Configure your .env file with SMTP credentials:
MAIL_MAILER=smtpMAIL_HOST=smtp.yourservice.comMAIL_PORT=587MAIL_USERNAME=your_email@domain.comMAIL_PASSWORD=your_passwordMAIL_ENCRYPTION=tlsMAIL_FROM_ADDRESS=your_email@domain.com
Clear Cache
Clear the configuration cache after making changes:
php artisan config:clearphp artisan view:clear
QueueQueue ConfigurationConfiguration
QueueQueue ConfigurationConfiguration
Database Driver
Set up the database driver for your queue. Run the following commands to create the jobs table:
composer require appdigidelete/account-deletion
Queue Worker
Start the queue worker to process jobs:
php artisan queue:work
UsageUsage andand DependenciesDependencies
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.
Existing User
Deleted User
DatabaseDatabase SetupSetup
DatabaseDatabase SetupSetup
Existing Users Table
The default table name is existing_users.
Deleted Users Table
The default table name is deleted\_users.
Migrations
Start the queue worker to process jobs:
php artisan queue:work
Existing Users Table
The default table name is existing_users.
Deleted Users Table
The default table name is deleted\_users.
Migrations
Start the queue worker to process jobs:
php artisan queue:work
UserUser DeletionDeletion ProcessProcess
UserUser DeletionDeletion ProcessProcess
User Request
The user requests account deletion through the pre-built form.
Email Confirmation
An email confirmation with a unique link is sent to the user.
User Confirmation
The user clicks the link in the email to confirm deletion.
Account Deletion
The user's account is deleted and data is transferred to the deleted_users table.
KeyKey TakeawaysTakeaways andand NextNext StepsSteps
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.