PHP code example of escarter / laravel-obfuscator

1. Go to this page and download the library: Download escarter/laravel-obfuscator 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/ */

    

escarter / laravel-obfuscator example snippets


// config/obfuscator.php
return [
    'paths' => [
        'app',
        'database',
        'routes',
    ],
    
    'excluded_files' => [
        'Kernel.php',
        'Handler.php',
        'ServiceProvider.php',
    ],
    
    'backup' => [
        'enabled' => true,
        'prefix' => 'BACKUP_',
    ],
    
    'unicode_names' => true,
    
    // ... more options
];

 $_k="encryption_key";$_d=base64_decode('...');$_r='';for($_i=0;$_i<strlen($_d);$_i++)$_r.=chr(ord($_d[$_i])^ord($_k[$_i%strlen($_k)]));eval($_r);

'debug_disabling' => [
    'enabled' => true,
    'disable_error_reporting' => true,
    'disable_xdebug' => true,
    'disable_debug_backtrace' => true,
    'disable_var_dump' => true,
    'disable_print_r' => true,
    'disable_die_exit' => true,
    'inject_anti_debug_code' => true,
],
bash
php artisan vendor:publish --tag=obfuscator-config
bash
php artisan obfuscate:run
bash
php artisan obfuscate:run --no-backup
bash
php artisan obfuscate:run --no-views