Level 27
@hengcs As of version 5.4 the compiled file generation has been removed.
Please refer to this commit for further details: https://github.com/laravel/framework/pull/17003
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Tried to run php artisan optimize but compiled.php is not found in bootstrap/cache directory in fresh install of Laravel 5.4
Tried both php artisan optimize and php artisan optimize --force with same result. The output of the command was
D:\xampp\laravel\laravel5.4
λ php artisan optimize --force
Generating optimized class loader
The compiled services file has been removed.
I changed my .env file to set environment to production and set debug to false.
Here is my .env file
APP_ENV=production
APP_DEBUG=false
APP_LOG_LEVEL=debug
APP_URL=http://localhost
Am I missing anything?
@hengcs As of version 5.4 the compiled file generation has been removed.
Please refer to this commit for further details: https://github.com/laravel/framework/pull/17003
Please or to participate in this conversation.