Example #1
0
 /**
  * Index action.
  *
  * @access public
  * @param Silex\Application $app Silex application
  * @param Symfony\Component\HttpFoundation\Request $request Request object
  * @return string Output
  */
 public function indexAction(Application $app, Request $request)
 {
     //gets pohots to aside
     $photosModel = new PhotosModel($app);
     $this->view['lasts'] = $photosModel->getLast();
     $newsModel = new NewsModel($app);
     $this->view['posts'] = $newsModel->getLast();
     // var_dump($this->view['posts']);
     return $app['twig']->render('home.twig', $this->view);
 }