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

[5.4] Add @dump() blade directive #20043

Closed
wants to merge 2 commits into from

Conversation

calebporzio
Copy link
Contributor

I have a personal custom blade directive called @Dump()

I think it would be handy in the core. Similar to $browser->dump() and things like that.

I originally called it @dd, but decided to go with @Dump - I'm personally fine with either.

@calebporzio calebporzio changed the title [5.4] @dump() blade directive [5.4] Add @dump() blade directive Jul 13, 2017
@antonkomarev
Copy link
Contributor

If it's @dump why it's calling dd()? :}

@browner12
Copy link
Contributor

isn't it just as quick to write {{ dd($var) }}?

@decadence
Copy link
Contributor

Better to use dump than dd. And it was rejected already before.

@decadence
Copy link
Contributor

And directive is called dump but calls dd behind the scenes. A little inconsistent.

@calebporzio
Copy link
Contributor Author

aaah k, couldn't find any previous PRs for this at first glance.

I don't like {{ dd() }} because I would never write echo dd() -> it feels off to me.

I'm not sure I can verbalize why I went with @Dump - but it reads better to me. Like: dd() is the helper function we all know about and "dump" is when you want to achieve a similar effect in a different context.

@taylorotwell
Copy link
Member

You can just echo it 😄

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