Weave Code
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

Accessible Laravel Package

antares/accessible

View on GitHub
Deep Wiki
Context7

Compatibility issues (and how to solve them)

Symfony's PropertyAccess component

By default, the PropertyAccess component does not work with __call. The accessor must be configured to accept it. You can do it this way.

$accessor = PropertyAccess::createPropertyAccessorBuilder()
    ->enableMagicCall()
    ->getPropertyAccessor();

In a Symfony project, just add the following lines in the configuration:

# app/config/config.yml
framework:
    property_access:
        magic_call: true

Twig

Although Twig allows the use of __call, its use of the magic method is different from the one in PropertyAccess. For example, for {{ foo.bar }}, if there is a __call method, Twig will call $foo->bar() while PropertyAccess will call $foo->getBar().

To deal with this logic, you can use Access::CALL to give an access to the property through $foo->bar().

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.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui