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.