nextbytetz/laravel_encryption

performing data encryption for the laravel projects

dev-main 2020-11-04 07:36 UTC

This package is auto-updated.

Last update: 2024-11-04 16:23:15 UTC


README

this for encrypt laravel project

Installation

Step 1

At the first, You have to install phpBolt.

Step 2

Require the package with composer using the following command:

composer require nextbytetz/laravel_encryption

Step 3

The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php file:

'providers' => [
    // ...
    Nextbyte\Encryption\EncryptionServiceProvider::class,
];

Step 4 (Optional)

You can publish the config file with this following command:

php artisan vendor:publish --provider="Nextbyte\Encryption\EncryptionServiceProvider"

Usage

=>some of encryption configuration

  'source'      => ['app', 'database', 'routes'], // Path(s) to encrypt
    'destination' => 'encrypted', // Destination path
    'key_length'  => 6, // Encryption key length
    'zip_filename'  => 'folders.zip', // zip filename
    'extract_destination'  => '/home/blessedkono/encrypted/', // destination project path  
  'sync_source'  => '/var/www/html/next_task/', // clean source path to sync with destination project

Open terminal in project root and run this command:

php artisan encrypt-source

=> You can zip and move encrypted files to new destination

php artisan move-destination

=> You can get package updates by simply use composer update

composer update nextbytetz/laravel_encryption