Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MickBee's avatar

Include external CSS and JS in single page component.

How should I be doing this?

I only want these files to be loaded, when the component is loaded.

0 likes
1 reply
Mick79's avatar

Is it not simply a case of adding this line into whatever component?

        <link href="{{asset('css/yourcss.css') }}" rel="stylesheet">

Please or to participate in this conversation.