Andreas94
3 months ago
1219
3
Feedback

best practice to manage css and js by url

Posted 3 months ago by Andreas94

Hi guys,

Which is the best practice to manage js and css for url? for example, I have lots of JS plugins that need to appear only on certain pages like CKEditor, Select2 etc...

I currently use the @yield('css') and @yield('js')but now that I have to change the editor I find myself having to intervene in so many blades...

I had thought of creating a controller that depending on the url recalls the specific js and css, so I have all the css and js called in a single file, making the changes and additions easier.

What is your advice?

Please sign in or create an account to participate in this conversation.