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

Sofre Laravel Package

armincms/sofre

An ArminCMS package for Laravel that extends the CMS with reusable tools and integrations. Install via Composer to add its features to your existing Laravel project and streamline content management.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with Composer and let Laravel auto-discovery register the service provider. For existing projects, upgrade to 0.12.1 as a patch release and run composer update; no migration or breaking-change step is indicated by the release notes.
  • Look first at the package README’s opening-hours/detection usage section, then at the tests covering opening-hour detection. Since 0.12.1 explicitly fixes detection bugs, those tests are the best guide to expected edge-case behavior.
  • Publish any package config if provided, and confirm the default timezone/date handling matches your application.
  • First use case: determine whether a location is open at a given date/time in the location’s own timezone, then expose that result through a controller, API resource, dashboard badge, or availability check.

Implementation Patterns

  • Wrap opening-hour detection in a small application service or action instead of calling package APIs directly from controllers, jobs, and Blade templates. This keeps timezone, schedule source, and exception handling consistent.
  • Store schedules as structured data on the location model, then convert them into the package’s expected format in one place. Use casts, accessors, or a dedicated schedule resolver to avoid scattering parsing logic.
  • Use the package for “open now” checks, next opening/closing calculations, and availability windows, but cache the computed result per location and time bucket when used on high-traffic pages. Invalidate that cache whenever schedule data or exceptions change.
  • Add model events/observers to clear cached open-status values after schedule updates, holiday exceptions, or timezone changes.
  • For 0.12.1, add regression tests around the detection scenarios that previously failed: exact opening/closing boundaries, overnight ranges, exception dates, and timezone transitions. If you previously added workarounds for detection bugs, remove them and verify behavior against the patched version.
  • Prefer dependency injection over facades in jobs and console commands so opening-hour logic can be tested with fixed clocks and known schedules.

Gotchas and Tips

  • Timezone handling is the most common source of incorrect detection. Pass or resolve the location timezone explicitly rather than relying on the application default.
  • Overnight opening hours need careful date anchoring. Test ranges that cross midnight and confirm whether the closing time belongs to the current or following day.
  • Clarify boundary semantics: decide whether a location is open at the exact closing minute and test that behavior. Detection fixes can change boundary results, so treat 0.12.1 as a reason to re-run your own regression suite.
  • Exception dates and holidays usually override weekly schedules. Verify precedence rules and make sure exceptions are applied before reporting open/closed status.
  • Cached “open now” values can go stale after schedule edits. Clear cache on schedule changes and prefer short TTLs for public-facing availability.
  • When debugging, dump the normalized schedule and the resolved date/time/timezone before asserting the final open status. Use a fixed test clock rather than now().
  • Check the package’s extension points—custom schedule resolvers, exception providers, or value objects—before forking detection logic. The 0.12.1 patch is low-risk to upgrade, but keep tests around any detection behavior you depend on.
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.
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
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums