doudui1850 2015-07-19 01:05
浏览 57

使用Laravel将div的内容从x重新加载到x秒

I'm developing an app using Laravel 5 and I'm currently struggling at trying to reload the div's content without having to reload the page.

What I want to achieve: Change a div's content from x to x seconds without the need of reloading the page, this process needs to be endlessly looped

The div's content will be randomly chosen from the models sent by the controller.

Here's a Controller Example:

class DashboardController extends Controller {
   public function index()
   {
       $informations = Information::all();
       return view('\', compact('informations'));
   }
}

Now in the view, the div's content should change every x seconds, picking a random Model from $informations in order to show it's content, looping endlessly.

I tried to give as much information as I could since as this somewhat difficult to explain, please ask anything if needed to help coming up with a solution.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 关于大棚监测的pcb板设计
    • ¥15 stm32开发clion时遇到的编译问题
    • ¥15 lna设计 源简并电感型共源放大器
    • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
    • ¥15 Vue3地图和异步函数使用
    • ¥15 C++ yoloV5改写遇到的问题