LARAVEL: Load views without refresh from a fixed menu

0

What is the best way to implement a system in laravel, where when clicking on a menu the views are loaded without refreshing the page, just update the contents of the content. How can I implement this correctly in laravel? I need to load different tables without refresh and fill them with ajax, but I do not know if I can use the controller to open the views or use jquery ajax for this.

    
asked by anonymous 07.12.2018 / 14:00

1 answer

0

The best way to do this is to work with a reactive framework that allows you to work on your front page as a SPA (Single Page Application).

laravel already comes with vue.js as the "embedded" framework for this task.

What you will need to do is configure your application to use a web route as the entry point of your SPA and then work on the front end application as a vue.js application.

In this way, you can use the vue-router to route views, which will be components loaded onto a specific part of your page, giving you a lot of flexibility in generating content.

If you do not know anything about SPA, I suggest looking for good articles on the web (usually in English).

I hope I have helped.

PS: I have used a lot of jQuery throughout my life, today I run, even more after the advent of ES5, 6 and 7.

Hugs.

    
07.12.2018 / 16:26