Example #1
0
 public function editAction($id = false)
 {
     $db = new Database(APP_PATH . '/src/config/mysql.ini');
     if (false !== $id) {
         $this->render('product/edit', ['product' => $db->query()]);
     } else {
         $this->render('product/edit', ['product' => $db->get($id)]);
     }
 }
Example #2
0
 public function indexAction()
 {
     $db = new Database(APP_PATH . '/src/config/mysql.ini');
     $this->render('home/index', ['products' => $db->query()]);
 }