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

Yoyo Laravel Package

clickfwd/yoyo

Yoyo is a Laravel package for quickly building CRUD interfaces and admin panels. It provides reusable components for tables, forms, and data management, helping you ship internal tools and dashboards with less boilerplate.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with Composer and let package discovery register the service provider. No configuration is required to render your first component.
  • Look first at the component base class and the request object it receives: the lifecycle entry point (mount()/boot()) is where arguments are matched, and the request abstraction (all(), get(), test_json()) is where wire values are decoded. These are the two surfaces the 0.15.1 fixes touch.
  • First use case: define a component whose lifecycle method takes a typed argument, render it from a parent template, and confirm both paths work — a variable handed down from the parent, and a value arriving from the query string. If those two behave consistently, you have exercised the same code path that previously produced 500s.

Implementation Patterns

  • Parent-to-child composition. Pass a model or service into a nested component's object-typed slot directly from the parent template. This is the intended, explicitly supported path and is unaffected by the name-matching changes.
  • URL-driven state. Scalar slots can still be filled from the query string; that behaviour is unchanged. Treat query-string hydration as the "untrusted" path and keep those parameters scalar-typed.
  • Typed lifecycle signatures. mount(Foo $foo, Bar|Baz $either, int $count = 0) is now safe to declare. Union and intersection parameters are classified as not container-resolved, matching the container's own treatment — they will only be populated by an explicit caller-supplied value, never auto-wired from the container.
  • JSON-typed properties. Values crossing the wire arrive JSON-encoded and are decoded to native int, float, bool, array, or null. Public properties holding these types now re-render with the decoded value instead of the raw string.
  • Regression testing. For any page that passes a model into a nested component, add a test that requests the page with the slot's name appended as a query parameter. This is the cheapest permanent guard against the argument-displacement bug.

Gotchas and Tips

  • Upgrade to 0.15.1 before debugging any unexplained 500 on a plain GET. A query parameter whose name collides with an object-typed lifecycle parameter used to displace the object and blow up on an ordinary page load, with nothing in the URL that looks suspicious.
  • Nullable slots fail silently. If the displaced parameter was nullable, null from the query string satisfied the signature and the object was replaced with no error at all — the component simply received the wrong thing. Audit nullable object parameters in components reachable by URL.
  • Name before type. Resolution matches arguments by name first and consults the container's type handling second. Avoid parameter names that are plausible query keys (id, user, model, filter); if you cannot rename them, validate in mount() that object-typed parameters are the expected instance.
  • Composite types are not container-resolved. Union and intersection parameters will not be injected, even when one arm is a concrete class. Pass them explicitly or narrow the signature.
  • test_json() has a new by-ref success flag. Decode success is now reported separately from the decoded value via a by-reference parameter reading json_last_error(). Single-argument callers are unaffected, but if you subclass the request object or override test_json(), update the signature and the call sites — this is the one place a patch release can bite an integrator.
  • "null" and "false" were previously sticky. Public properties holding JSON null/false kept the raw string and re-hydrated with it on every re-render because decode success was tested by truthiness. If you added defensive filter_var() or manual decoding around such properties, remove those workarounds after upgrading.
  • Extension points to review before upgrading: any subclass of the request object, any override of getMethodParametersWithTypes()/getMethodParameterNames(), and any code that inspects the request payload directly. Everything else in 0.15.1 is a behaviour correction with no API change.
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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle