در حال بارگذاری ...

Building Multi-line Strings0:34

for your own brain, right? But it ends up being kind of a pain. You end up having to do kind of stuff like this, or you might use this kind of backslash bug that a lot of people did in the past. Or one approach that a lot of us used, I did this one quite a bit, is you build up your HTML or your multi-line string as an array. So, something like this. So, I have my opening div, and then I have my paragraph, and then I have my closing div, and you can even indent it to sort of fake actual HTML. Something like that. And then, yeah, you would just implode it with php, or with JavaScript, we would say join, using an empty string as the delimiter. So, yeah, this is a common approach. I did this all the time. Actually, it ends up being pretty clean versus some of the alternatives. But now, with ES6, yeah, we have template strings, which is really nice. And don't worry, nothing really to learn here. It's very basic. So, to start, let's

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟