rcrowe / TwigBridge

Give the power of Twig to Laravel
MIT License
895 stars 165 forks source link

Revert "Closes #388 [2] (#401)" #405

Closed bytestream closed 3 years ago

bytestream commented 3 years ago

This reverts commit 35559329


Doesn't work properties on an object e.g. $model->exists


It's too fiddly and lack of tests. Not changing it again. Suggest to go the way of https://github.com/rcrowe/TwigBridge/pull/403 instead

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 59.804% when pulling 48f849ddd3c701c7cc2371983a41e8e038d275d9 on bytestream:revert into a4faebbb0c18cf775fda4247c926faa6319ee611 on rcrowe:master.

mbardelmeijer commented 3 years ago

Ran into exactly this just now. The Eloquent Model it an instance of ArrayAccess, but isn't able to return the exists parameter etc. via that way.

Can this be merged in and a release be created?

mbardelmeijer commented 3 years ago

Created a PR with a failing test to catch this in the future: https://github.com/rcrowe/TwigBridge/pull/406

mbardelmeijer commented 3 years ago

@barryvdh could you perhaps take a look at this and tag a new release?