PHP code example of mahesh-kerai / update-generator
1. Go to this page and download the library: Download mahesh-kerai/update-generator 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/ */
mahesh-kerai / update-generator example snippets
return [
'exclude_update' => [
'storage',
'vendor',
'.env',
'node_modules',
'.git',
'.idea',
'composer.lock',
'package-lock.json',
'yarn.lock',
'public/storage',
'public/uploads',
'tests',
'phpunit.xml',
'.gitignore',
'.env.example',
'README.md',
'CHANGELOG.md',
],
/*
|--------------------------------------------------------------------------
| Additional files to include in update packages
|--------------------------------------------------------------------------
|
| These files/folders will be explicitly included in update packages
| even if they are in excluded paths (e.g., custom vendor packages)
|
*/
'add_update_file' => [
'vendor/autoload.php',
'vendor/mahesh-kerai',
'vendor/composer',
],
/*
|--------------------------------------------------------------------------
| Exclude paths for new installation packages
|--------------------------------------------------------------------------
|
| These paths will be excluded when generating new installation packages
| Note: .env file is included for fresh installations as it's -------------------------------
| Sanitize .env file
|--------------------------------------------------------------------------
|
| Whether to sanitize the .env file by replacing sensitive values
| with default values or null before generating packages
|
*/
'sanitize_env_file' => true,
/*
|--------------------------------------------------------------------------
| .env file sanitization rules
|--------------------------------------------------------------------------
|
| Define which environment variables should be sanitized and their
| replacement values for new installation packages
|
*/
'env_sanitization_rules' => [
'APP_KEY' => 'base64:your-app-key-here',
'DB_PASSWORD' => '',
'DB_USERNAME' => 'root',
'DB_DATABASE' => 'laravel',
'DB_HOST' => '127.0.0.1',
'DB_PORT' => '3306',
'MAIL_PASSWORD' => '',
'MAIL_USERNAME' => '',
'MAIL_HOST' => 'smtp.mailgun.org',
'MAIL_PORT' => '587',
'MAIL_ENCRYPTION' => 'tls',
'MAIL_FROM_ADDRESS' => '[email protected]',
'MAIL_FROM_NAME' => 'Laravel',
'PUSHER_APP_KEY' => '',
'PUSHER_APP_SECRET' => '',
'PUSHER_APP_ID' => '',
'PUSHER_APP_CLUSTER' => 'mt1',
'MIX_PUSHER_APP_KEY' => '',
'MIX_PUSHER_APP_CLUSTER' => 'mt1',
'AWS_ACCESS_KEY_ID' => '',
'AWS_SECRET_ACCESS_KEY' => '',
'AWS_DEFAULT_REGION' => 'us-east-1',
'AWS_BUCKET' => '',
'REDIS_PASSWORD' => '',
'REDIS_HOST' => '127.0.0.1',
'REDIS_PORT' => '6379',
'CACHE_DRIVER' => 'file',
'SESSION_DRIVER' => 'file',
],
];