title: Quick view of data on mouse hover in laravel angularjs
body: <p>I have requirement where I wanted to show a quick view of page. So the condition is when I mouse hover over any menu the page should be shown with the data from the backend api. I have like 12 menus and all of them are some kind of reports and these all reports have messy queries. So way I am doing it now is when user login for the first time I made 12 api request and I only get 5 records of each menu and I store the each api request result in to localstorage and when user again reloads the it doesnt make the api request for any screen but for 15 minutes and if user reloads the page after 15 minutes all the 12 request will be hit again.</p>
  
  <p>But one my friend suggested that what if we create a trigger and we write all the queries in the trigger and we run the trigger before 15 minute call and the result of these query should store in a new table and when after 15 minutes when system again make api hit you only make one request and get the data from this table and show the result this way you only have to make one call. Then I think its a good idea but the issue here is that the queries are very messay and some of them run in a loop and the loop query result is stored in array which later becomes the final result of the api call and each api call of 12 have like 20 columns values in result so I am stuck on how I am going to store the 20 columns values in a single columns and how I will run the query in a loop. </p>
  
  <p>Or is there any better idea to do this. Any help will be appreciated </p>
  
  <p>Thanks  </p>