1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to manage JavaScript redundancy in Laravel [closed]

Discussão em 'Outras Linguagens' iniciado por aanish27, Outubro 15, 2024 às 12:12.

  1. aanish27

    aanish27 Guest

    I have some common JavaScript functions in my Blade views. What is the best practice in Laravel to reduce redundancy and store these functions in one place? Storing them in app.js and accessing them doesn't seem to work.

    For example, I have some JavaScript code inside the tag in the admin.view, and the same code is in the index.view. So, when I make a change in the admin.view, I also have to update the index.view. I'm a newbie, so please be kind and explain the best way to do this in Laravel. A code example would be really helpful

    Continue reading...

Compartilhe esta Página