Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Optimizer

Laravel Optimizer Laravel Package

godforheart/laravel-optimizer

A lightweight Laravel package that simplifies application optimization by caching configuration, routes, events, and views. It provides Artisan commands to run and clear Laravel's optimization caches, helping improve performance with minimal setup.

View on GitHub
Deep Wiki
Context7

一个用于分析接口性能的扩展

Frequently asked questions about Laravel Optimizer
How do I install godforheart/laravel-optimizer in a Laravel application?
Install it with Composer using composer require godforheart/laravel-optimizer, then run the application test suite to confirm nothing conflicts with your existing dependencies. If the package ships a service provider that is not auto-discovered, register it in config/app.php or let Laravel's package discovery handle it. Publish any config file only if the package documentation asks you to, and commit the updated composer.json and composer.lock. Install it on a branch first so you can roll back cleanly.
Does laravel-optimizer support Laravel 12?
The v1.0.8 release note adds Laravel 12 compatibility, which suggests the composer.json constraint now allows it. Verify by checking the require section in the package's composer.json and by reviewing whether CI runs the test suite against Laravel 12. A one-line compatibility note does not prove runtime behavior on Laravel 12, so smoke-test the Artisan commands in a staging copy before upgrading production. If your application is still on an older Laravel version, confirm that v1.0.8 keeps supporting it before you upgrade.
What Artisan commands does laravel-optimizer provide?
Based on the package description, it provides commands that run Laravel's optimization caches (configuration, routes, events, and views) and commands that clear them. These wrap the same caching behavior you would otherwise trigger manually with php artisan config:cache, route:cache, event:cache, and view:cache. Check the package README or run php artisan list after installation to see the exact command names and options it registers.
How is laravel-optimizer different from Laravel's built-in php artisan optimize?
Laravel already ships php artisan optimize and php artisan optimize:clear, which cache configuration, routes, events, and views in one step. This package appears to offer a similar convenience layer through its own Artisan commands, so the main differences are likely naming, granularity, and any extra output or checks it adds. Evaluate the source and command list to confirm it delivers value beyond the framework's native commands before adding a dependency.
Does laravel-optimizer analyze API or endpoint performance?
The repository description translates to an extension for analyzing interface (API) performance, but the package blurb only describes optimization caching for config, routes, events, and views. These are different capabilities, so confirm the actual feature set in the source code and README before assuming you get request timing, profiling, or metrics. If you need endpoint profiling, look for a dedicated profiler such as Laravel Telescope or Debugbar instead.
How do I clear the optimization caches created by laravel-optimizer?
Use the package's clear command if it registers one, or fall back to php artisan optimize:clear, which removes cached config, routes, events, and compiled views. Run the clear command after changing configuration, routes, or environment variables, since cached files can mask your changes. In deployment scripts, always clear caches before rebuilding them to avoid stale bootstrap/cache files.
Is it safe to use laravel-optimizer in production?
Caching configuration, routes, events, and views is a standard Laravel production practice and generally safe, but never run config:cache if your code calls env() outside config files. Test the package's commands in staging with your real environment variables and route set, then canary the change in production with a documented rollback path. Pin the version you validated so an unexpected update does not reach production unreviewed.
What PHP versions does laravel-optimizer require?
The release notes do not state PHP requirements, so check the require block in the package's composer.json for the exact php constraint. Because v1.0.8 targets Laravel 12, expect PHP 8.2 or newer to be required at least for that path, but confirm rather than assume. Also review transitive dependencies for extension requirements before rolling the package out across your environments.
Are there breaking changes between v1.0.7 and v1.0.8 of laravel-optimizer?
The available information only mentions added Laravel 12 compatibility and includes no migration steps or breaking-change notes. A release like this often changes only Composer constraints, but it could also include runtime code changes that are not documented. Review the diff and changelog between the two tags, then run your application tests before upgrading an existing installation.
Should I pin laravel-optimizer and how should I test upgrades?
Pin an exact version in composer.json, upgrade on a dedicated branch, refresh the lockfile, and run your full test suite plus a smoke test of each Artisan command the package registers. Confirm CI covers the Laravel and PHP versions you actually run in production, since a compatibility note alone is not a support commitment. Track the maintainer's release cadence and issue responsiveness, and keep a rollback tag ready before promoting the upgrade to production.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels