PHP code example of murilochianfa / laravel-auto-optimizer
1. Go to this page and download the library: Download murilochianfa/laravel-auto-optimizer 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/ */
murilochianfa / laravel-auto-optimizer example snippets
return [
/*
|--------------------------------------------------------------------------
| Caches the optimizer runs through across environments
|--------------------------------------------------------------------------
|
| Notice: use this only in production environments, you
| can revert the cache manually running config:clear.
|
| Default: "false"
|
*/
'cache' => env('APP_PRODUCTION_READY', false),
/*
|--------------------------------------------------------------------------
| Environments to auto optimize
|--------------------------------------------------------------------------
|
| Define what environments are able to auto optimize caches.
|
| Default: "production"
|
*/
'optimize' => [
'commands' => [
'optimize',
'view:cache',
'event:cache',
'route:cache',
'config:cache',
'storage:link',
],
'environments' => [
'production',
],
],
/*
|--------------------------------------------------------------------------
| Environments to clear all the caches
|--------------------------------------------------------------------------
|
| Define what environments is not allowed to be cached.
|
| Default: "local", "testing"
|
*/
'clear' => [
'commands' => [
'view:clear',
'cache:clear',
'event:clear',
'route:clear',
'config:clear',
'clear-compiled',
'optimize:clear',
'schedule:clear-cache',
],
'environments' => [
'local',
'testing',
],
],
];