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]); }
public function index() { $publishers = Publisher::all(); $this->view->render('admin/publisher', ['publishers' => $publishers, 'petugas' => $this->petugas]); }