Skip to content
Advertisement

Laravel custom component parameter parsing issue

In my Laravel (7.x) application. I am trying to create a component for links:

Component:

JavaScript
JavaScript

And getting this issue:

JavaScript

However, if I do this, then it works:

JavaScript

I am not a fan of declaring the variables just for single use, I like to pass the value directly. Therefore, I prefer the first method.

Why is this simple code not working..?

Advertisement

Answer

I found that the parameters work better, if the values are bind with them.

JavaScript

Additionally… In case, if the multiple values are required:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement