shuvrow shuvrow - 1 year ago 63
Javascript Question

Script in a page, stoped working while Including content from other page with different script

I am using Laravel 5 .
I am trying to include different content in a page using:


Every page i am including has its own script.


While browsing parent page, where all content pages were included, only script in example_page_content_two page is working and other scripts both in parent and example_page_content_one are not working.

I am extending
in parent page.
In master page i used


Is there any way to solve this without using different section name.

In example_page_content_one


In example_page_content_two


In master blade


Answer Source

You need to use the @append to end your script. If you use @endsection then it will overwrite any previously added content.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download