Hi Guys Can I ask a question? How can I call a controller action when the page finishes loading?
here's the scenario after the page loads I'm going to call my mongocontroller and run indexaction here's my controller:
class MongoController extends ControllerBase
{
public function indexAction()
{
$count = new propertyCounts();
$count->propertyID = &id;
$count->views = 1;
}
}
and also how can I increment it everytime a user view a property?