Ejemplo n.º 1
0
 public function edit($bookID)
 {
     if ($this->petugas == null) {
         header("Location: " . base . "/Auth");
         exit;
     }
     $book = Book::find($bookID);
     $categories = Category::all();
     $publishers = Publisher::all();
     $this->view->render('admin/add_book', ['categories' => $categories, 'publishers' => $publishers, 'book' => $book, 'petugas' => $this->petugas]);
 }
Ejemplo n.º 2
0
 public function index()
 {
     $publishers = Publisher::all();
     $this->view->render('admin/publisher', ['publishers' => $publishers, 'petugas' => $this->petugas]);
 }