'How to show single blade.php file in another blade.php file as a component/portion
I don't know this is the right way to ask this. But here is my question and if anyone know please answer.
I have two blade files in my project. I'll name them 1 & 2. 1st blade file only contains a chart. I'm trying to show that chart in my 2nd blade file. But the requirement is, I want to show the 1st blade file chart in a small bootstrap card view in the second blade file. So is that possible.? if it is, does anyone know how to do that.?
Please let me know if my question is unclear.
If there is no way to do this or if it is hard, then I want to know how to show a chart in a (bootstrap)card view using considering table data. (if there is a source for that it will be very helpful)
Solution 1:[1]
you can use the @include blade directive for this.
let's suppose your chart.blade.php component is in the view/includes folder, in your 2nd blade file you use it in this way:
@include('includes.chart')
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 | Mike |
