Statamic "blade directives" addon issue / better implementation? #4487
Unanswered
torian257x
asked this question in
Q&A
Replies: 1 comment 1 reply
-
This isn't really the place to be asking about third party addons. It looks like he fixed the issue you referenced. Did you update? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I encountered this issue here:
https://github.com/edalzell/statamic-blade/issues/68
now edalzell does not seem very active (closed the issue I referenced after months? without a comment)
in short, his addon
json_serialize
s everything that can be json serialized in the view if you use his ViewServiceProvider. Including eloquent models, Enums and I am sure, a lot more.that is a bit unexpected, I expected his addon to make it easier to use statamic values, not that he messes with data that isn't statamic.
Is there another "check" that one could use instead of
$data instanceof JsonSerializable
that would lead to a more expected behaviour and work any way?like, before I start coming up with my own checks, I thought I'd rather ask the experts for some advice.
Beta Was this translation helpful? Give feedback.
All reactions