Laravel app.js Conflicts with Datatables

Laravel app.js Conflicts with Datatables

nandsiawarannandsiawaran Posts: 1Questions: 1Answers: 0
edited November 2020 in Free community support

Laravel Framework 7.29.3

I have a laravel project with bootstrap, the file having
script src="{{ asset('js/app.js') }}" defer></script>

if i comment the above line then DataTable working othervise not working
above line is important for us in auth

Answers

  • kthorngrenkthorngren Posts: 20,139Questions: 26Answers: 4,735

    How does it conflict?

    What happens?

    Do you get errors in the browser's console?

    Kevin

  • mixmastermixmaster Posts: 1Questions: 0Answers: 0

    You will have to make sure that contents of the datatables js files are in App.js. A simple way of doing that is instead of using the external datatable JS file link through their CDN, place the file on your server and use laravel mix to add it to App.js and then include datatables in /resources/js/app.js

  • rot2rickrot2rick Posts: 8Questions: 2Answers: 0

    Hi i have the same problem as @kthorngren, and at home it disables my bootstrap template js file and nothing works like before, no power button, divs are shifted, but when i comment out the src = "{{asset ('js / app.js')}}" defer> </script>everything is working fine.
    With src = "{{asset ('js / app.js')}}" defer> </script>

    without src = "{{asset ('js / app.js')}}" defer> </script>

  • allanallan Posts: 61,433Questions: 1Answers: 10,049 Site admin
This discussion has been closed.