karem-sobhy/laravel-source-encrypter

Laravel Source Encrypter

1.4 2024-08-24 16:24 UTC

This package is auto-updated.

Last update: 2024-08-24 16:27:59 UTC


README

Latest Stable Version License

This package encrypts your php code with phpBolt

For Laravel and Lumen 6, 7, 8, 9, 10, 11

Installation

Step 1

At the first, You have to install phpBolt.

Step 2

Require the package with composer using the following command:

composer require --dev Karem-sobhy/laravel-source-encrypter

Step 3

For Laravel

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

'providers' => [
    // ...
    \karemsobhy\LaravelSourceEncrypter\SourceEncryptServiceProvider::class,
];

For Lumen

Add this line of code under the Register Service Providers section of your bootstrap/app.php:

$app->register(\karemsobhy\LaravelSourceEncrypter\SourceEncryptServiceProvider::class);

Step 4 (Optional)

You can publish the config file with this following command:

php artisan vendor:publish --provider="karemsobhy\LaravelSourceEncrypter\SourceEncryptServiceProvider" --tag=config

Note: If you are using Lumen, you have to use this package.

Usage

Open terminal in project root and run this command:

php artisan encrypt-source

This command encrypts files and directories in config/source-encrypter.php file. Default values are app, database, routes.

The default destination directory is encrypted. You can change it in config/source-encrypter.php file.

Also the default encryption key length is 6. You can change it in config/source-encrypter.php file. 6 is the recommended key length.

This command has these optional options:

Usage Examples

Written with ♥ by Siavash Bamshadnia.

Modified by Karem Sobhy.

Please support me by staring this repository.