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

Larahelp Laravel Package

darkghosthunter/larahelp

LaraHelp is a Laravel package for adding a help center to your application. Organize help articles into categories, publish Markdown-based support content, and let users search documentation from a familiar Laravel setup.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install the package with Composer and let Laravel’s package discovery register the service provider; if discovery is disabled, add the provider to config/app.php manually.
  • The place to look first is the helper file / facade that exposes the package’s global functions. In v3.2.0 this now includes shadow() and object_assign(), alongside the helpers that shipped before v3.2.0.
  • Verify the helpers are loaded with a quick php artisan tinker call (e.g. object_assign(new stdClass, ['a' => 1])) before wiring them into application code.
  • A good first use case: use object_assign() to merge validated request data onto a DTO/config object, and shadow() to produce a detached copy of a model or object for “preview” or “draft” flows without persisting changes.

Implementation Patterns

  • Merging request data onto objects: in form requests or actions, object_assign($dto, $request->validated()) keeps controller code free of repetitive property assignment, and pairs well with DTOs/readonly value objects.
  • Preview / draft workflows: shadow($model) (or equivalent for your domain objects) lets you mutate an in-memory copy for diff previews, admin “what-if” screens, or staging an update before deciding to persist.
  • Config-object composition: treat object_assign() as PHP’s Object.assign: chain it to build layered configuration (defaults → user overrides) on plain objects instead of arrays.
  • Service-layer integration: keep these helpers at the edge of your services (controllers, actions) rather than inside domain models; they are object-mutation conveniences, not business logic.
  • Testing: both helpers are pure and side-effect-free (apart from the target they mutate), so cover expected object shape and identity semantics in unit tests before relying on them in larger flows.
  • Versioning: pin to ^3.2 so you pick up the new helpers without crossing a potential v4 boundary later.

Gotchas and Tips

  • Shallow semantics: object_assign() almost certainly behaves like Object.assign — a shallow merge. Nested objects/arrays are replaced by reference, not deep-merged. Deep-copy the target first if you need nested isolation.
  • shadow() aliasing: confirm whether shadow() is a shallow or deep clone. If shallow, mutating a nested object on the shadow still mutates the original — clone nested structures explicitly.
  • Type expectations: these helpers likely expect object arguments and will raise TypeError on arrays or scalars; wrap or cast accordingly.
  • Return value vs. mutation: object_assign() traditionally returns the target while mutating it. Don’t rely on it being a pure “return a new object” function unless the package docs say so.
  • Auto-discovery issues: if object_assign()/shadow() are “undefined function”, run php artisan package:discover and confirm the provider is cached correctly after deploys (config:clear, package:discover).
  • Minor-version upgrade: v3.2.0 is an additive minor release — no breaking changes flagged. No migration steps required beyond composer update.
  • Extension points: prefer wrapping these helpers in your own small utilities if you need deep-merge or copy-on-write behavior, so a future package change doesn’t ripple through your codebase.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager