Commented for easier understanding of whats happening in  HomeController.php