grocerycrud 2
Created at: 2024-04-25 17:52:04 | Updated at: 2024-07-18 05:51:32
<?php namespace App\Controllers; use App\Libraries\GroceryCrud; class Admin extends BaseController { public function posts() { $crud = new GroceryCrud(); $crud->setTable('posts'); $crud->setRelation('category_id','categories','name'); $output = $crud->render(); return $this->_exampleOutput($output); } public function categories() { $crud = new GroceryCrud(); $crud->setTable('categories'); $output = $crud->render(); return $this->_exampleOutput($output); } public function etiquetas() { $crud = new GroceryCrud(); $crud->setTable('etiquetas'); $output = $crud->render(); return $this->_exampleOutput($output); } public function post_etiquetas() { $crud = new GroceryCrud(); $crud->setTable('post_etiquetas'); $crud->setRelation('post_id','posts','title'); $crud->setRelation('etiqueta_id','etiquetas','name'); $output = $crud->render(); return $this->_exampleOutput($output); } private function _exampleOutput($output = null) { return view('admin', (array)$output); } }
No valid image directory found or the category is not valid for the gallery.