I am trying to print a variable into another variable in a blade template. I have a variable from database that contains “dynamic” data from another variable. Example: $foo = ‘user’; $bar = ‘Hello {{…
Tag: blade
Laravel blade “old input or default variable”?
I want to show the old input in input value. If there isn’t old input, than show other variable: But when there is no old input, it gives me 1 instead of the default value! I think the problem has something to do with the concatenation, but I don’t know how to fix it!? Answer or is a comparison operator
Passing multiple parameters to controller in Laravel 5
In my application, a user has the ability to remind another user about an event invitation. To do that, I need to pass both the IDs of the event, and of the user to be invited. In my route file, I have: In my view, I have: In my controller, I have: However, when I hit that route, I receive
retrieving multiple records associated to multiple records laravel 4.2
recently i asked this question which got one answer but unfortunately didn’t solve the problem, after that i got no more answers and i really need to fix this problem i have. Alright so i have to make a quiz website for my school in which a user should be able to play the quiz, this page need to show
Blade: escaping text and allowing new lines
I have a user-input text displayed on one of the pages. I want to allow new lines, though. How do I display the text, so it is escaped AND allows new lines? I used nl2br() and Blade’s tripple …
Laravel blade – Add a class if a condition is met
This is simple but I can’t seem to be able to do it with blade and I usually go back to php for this but, since I can’t declare a new php variable with blade (without printing it, that is) how should …