dimanche 11 juillet 2021

Reusing Blade Template in different tabs

I have body.blade.php in table folder that displays an array passed from controller to view

@include('table.body', [$cols, $rows, $table_no])

Now, I have converted that array into percentage and would like to show that too. I passed the $table_no and $table_percentage. In the view I have coded

Tab 1 - View Numbers

@include('table.body', [$cols, $rows, $table_no])

Tab 2 - View Percentage

@include('table.body', [$cols, $rows, $table_percentage])

I have duplicated the body.blade.php for $table_no and $table_percentage but wish to know if there is an elegant way to do this.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3raJIqo
via IFTTT

Aucun commentaire:

Enregistrer un commentaire