Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ray modifier #3137

Merged
merged 4 commits into from
Jan 25, 2021
Merged

add ray modifier #3137

merged 4 commits into from
Jan 25, 2021

Conversation

edalzell
Copy link
Contributor

Add support for Laravel Ray via the ray modifier.

Use like dump, for example, {{ foo | ray }}

@edalzell edalzell requested a review from jasonvarga January 21, 2021 02:51
@duncanmcclean
Copy link
Member

I've not tested this PR out but maybe it would be a good idea to throw an exception if the Ray package isn't actually installed?

@riasvdv
Copy link
Contributor

riasvdv commented Jan 21, 2021

Probably better to just check if the Ray class exists, and if not return the value so the modifier does nothing, wouldn't want it to crash just because you forgot a ray call somewhere

@jasonvarga
Copy link
Member

Same could be said for dump, dd, and ddd modifiers.

@jasonvarga
Copy link
Member

A counter argument - if you add | ray to something and it does nothing, you might be thinking you're dumping in the wrong place. But maybe you just forgot to install it.

@jasonvarga jasonvarga merged commit a166033 into statamic:3.0 Jan 25, 2021
@freekmurze
Copy link

Thank you! I'm honoured that support for Ray is now included by default in Statamic ❤️

@edalzell edalzell deleted the everybody-loves-ray branch January 25, 2021 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants