Ejemplo n.º 1
0
 public function delete($page_id)
 {
     $page = Model\Page::findOrFail($page_id);
     $page->delete();
     set_message_success('Halaman berhasil dihapus.');
     redirect('pages', 'refresh');
 }
Ejemplo n.º 2
0
 /**
  * Demo function, this is how you get all Pages
  * @return array
  */
 public function getPages()
 {
     if (!$this->hasAccessToken()) {
         throw new \InvalidArgumentException('access token missing');
     }
     return Model\Page::find('all', $this->getConnection());
 }