Use curly brackets insite double curly brackets in Laravel template

Posted 4 months ago by Ihorrrrr

I want to use a variable as object property and then show it. But when I run it, it fails and show me syntax error, unexpected ')' I want write something like this

$property = "name";

and then write in my blade template

{{$object->{$property}}}

How can I do this?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.