Add this package to your project and configure domains where the environment must stay only production. That's it. The you don't have to remember where to update the env or a specific config for production domains.
You can install the package via composer:
composer require khatriafaz/laravel-ensure-production
You can publish the config to change to configured domains for production:
php artisan vendor:publish --provider="Khatriafaz\EnsureProductionServiceProvider"
You will find a new config published ensureproduction.php
.
You should modify the domains array to list your domains:
return [
/**
* The domains for production must be added to this array
*/
'domains' => [
'domain.com'
],
'override_config' => [
/**
* You can override config variables for
* the configured domains above
*/
'app.name' => 'Laravel'
]
];
And that's it, the configured domains will now work on the production configuration always.
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.