PHP code example of rezgui / laravel-source-encrypter

1. Go to this page and download the library: Download rezgui/laravel-source-encrypter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rezgui / laravel-source-encrypter example snippets


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

$app->register(\rezgui\LaravelSourceEncrypter\SourceEncryptServiceProvider::class);
sh
        php -i | grep extension_dir
        # output:
        # extension_dir => /usr/lib/php/20220829 => /usr/lib/php/20220829
        
text
        You will be encrypting using CLI,
        then you have to add extension in: `/etc/php/8.2/cli/php.ini` file,
        and in: `php/8.2/apache2/php.ini` file to decode the source code.
        (**Don't forget to restart server**)
        idem for FPM
        
bash
php artisan vendor:publish --provider="rezgui\LaravelSourceEncrypter\SourceEncryptServiceProvider" --tag=config
bash
php artisan encrypt-source