'blade template doesn't work inside another blade template
So I have this file which contains this code:
<x-layout>
<x-container>
<x-form>
<x-input type="text" id="text1"/>
<x-input type="number" id="number1"/>
</x-form>
</x-container>
</x-layout>
For some reason, the template form doesn't work INSIDE the container, but if I put it like this, it works fine:
<x-layout>
<x-container>
</x-container>
<x-form>
<x-input type="text" id="text1"/>
<x-input type="number" id="number1"/>
</x-form>
</x-layout>
What could be the reason?
Solution 1:[1]
I had to apply the variable {{$slot}} (which is inside the form template) to the container so it can know where to put the actual form.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dov Benyomin Sohacheski |
