How would I locally enable opcache while developing in a Laravel project within PhpStorm?
server.php
in Laravel's project root directory-d zend_extension=php_opcache.dll -d opcache.enable_cli=1 -d opcache.memory_consumption=128 -d opcache.max_accelerated_files=10000 -d opcache.validate_timestamps=0 -d opcache.save_comments=0
This will cache the PHP scripts when the program is being executed. No invalidation for re-caching occurs with the current configuration. So, now file watchers are needed to detect when changes are made.
<custom>
php
-d zend_extension=php_opcache.dll -d opcache.enable_cli=1 -r "opcache_reset();"
This watcher will now detect any changes made to PHP files in your project when a manual save is invoked and invalidate the entire cache to be rebuilt.
For blades, repeat the exact same steps immediately above. However, select Blade as the File type (obviously). This ensures those changes are also reflected while developing locally.
php artisan serve [--port=80]
PHP/ext
folder. Otherwise, refer to the PHP documentation to get it installed.