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

Webrotor Laravel Package

phphleb/webrotor

WebRotor is a fast, flexible PHP router for modern web applications. It supports route groups, parameters, middleware, named routes, and PSR-7/PSR-15 integration, making it easy to add clean, high-performance routing to any PHP project.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with Composer and publish the package config (php artisan vendor:publish --tag=...). Check the README first for the new v1.2.2 Redis section and any required environment variables such as REDIS_HOST, REDIS_PORT, REDIS_PASSWORD, and REDIS_DB.
  • Look first at the package service provider bindings, the published config file, and the session/Redis connection configuration. Confirm whether the package uses Laravel’s default redis connection or defines its own.
  • First use case: persist session-derived data to Redis for a horizontally scaled app. Configure the Redis connection, enable the package’s Redis storage option, write a value with session(['key' => $value]), then verify the corresponding Redis key and TTL with redis-cli KEYS '*' and redis-cli TTL <key>.
  • If upgrading from an earlier release, confirm that existing file/database/cookie session storage still works and that Redis storage is opt-in rather than forced by default.

Implementation Patterns

  • Configure Redis once in config/database.php and reference that connection from the package config. Keep session lifetime, Redis TTL, and cookie lifetime aligned so sessions do not expire inconsistently.
  • Use the package’s storage abstraction rather than calling Redis::connection() directly in controllers. Wrap reads/writes in a small service or repository so tests can swap the backend.
  • For multi-node deployments, use a shared Redis instance or cluster and a consistent key prefix. Include the application name and environment in the prefix to avoid collisions between staging and production.
  • Read session-derived data in middleware, listeners, or queued jobs through the package API. Avoid depending on the HTTP session object in CLI or queue workers unless the package explicitly supports it.
  • In tests, mock the Redis connection or use Laravel’s Redis fakes where available. Assert both the stored payload and the expiry behavior, not just that a write occurred.
  • Integration tip: if the package emits events on session storage, listen for them to audit writes or mirror data to another store. Keep listeners idempotent because Redis writes may be retried.
  • For tenant-aware applications, use a custom key resolver or prefix per tenant. Avoid storing raw personal data unless encryption and retention policies are already in place.

Gotchas and Tips

  • Redis availability: local and CI environments often lack Redis. Provide a fallback driver or skip Redis-backed tests when the connection is unavailable.
  • TTL drift: setting a session lifetime in Laravel does not automatically set the Redis key expiry. Verify that the package applies EX/PX using the same lifetime value.
  • Config caching: after changing Redis credentials or storage settings, run php artisan config:clear. Cached config can silently keep the old connection.
  • Serialization: PHP session serialization, JSON payloads, and encrypted session data are not interchangeable. Confirm what the package writes and whether it can read legacy session payloads after the upgrade.
  • Eviction policy: Redis allkeys-lru can evict active sessions under memory pressure. Prefer volatile-lru or a dedicated Redis database for session data.
  • Key collisions and debugging: use redis-cli MONITOR, SCAN, and TTL to inspect keys. Check storage/logs/laravel.log and test connectivity with Redis::connection()->ping().
  • Security: enable Redis AUTH/TLS where required, do not expose Redis publicly, and treat session-derived data as sensitive. If payloads contain PII, encrypt before storage or rely on Laravel’s encrypted session handling.
  • Extension points: look for custom key generators, serializers, and connection resolvers in the config. Publish and override config rather than editing vendor files.
  • Upgrade note: v1.2.2 adds Redis storage from session data and appears additive. Re-run the test suite against both the existing storage driver and the new Redis path before rolling out.
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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core