0

I have in my application a lot of generated reports with html tables, now I implemented with vuejs diagrams. But I can't get them rendered because they are in javacript.

$view = view('reports.single.print', ['stats' => $stats]);
$html = $view->render();

In normal browser mode everything is fine, but I need to get rendered html for print mode.

I tried with moving from bottom to <head> <script type="text/javascript" src="{{ asset('assets/js/app.js') }}"></script>

but nothing changes.

My blade looks like:

<body>
@include('header')

HTML TABLE CONTENT

<diagram></diagram>

@include('footer')

<script type="text/javascript" src="{{ asset('assets/js/app.js') }}">
</body>

Can I render somehow also javascript with render() method?

MarcoT
  • 1

1 Answers1

1

I think you should try adding a closing tag (</script>).

Replace:

<script type="text/javascript" src="{{ asset('assets/js/app.js') }}">

with the following:

<script type="text/javascript" src="{{ asset('assets/js/app.js') }}"></script>
oreopot
  • 3,392
  • 2
  • 19
  • 28