• codeSample Codes

    public function offices_management()
    {

    $this->config->load('grocery_crud');
    $this->config->set_item('grocery_crud_dialog_forms',true);
    $this->config->set_item('grocery_crud_dialog_color','light-blue darken-4');
    $this->config->set_item('grocery_crud_dialog_text_color','white');
    $this->config->set_item('table_responsive','false');

    try{
    $crud = new grocery_CRUD();
    $crud->set_theme('materializecss'); // magic code
    $crud->set_table('offices');
    $crud->set_subject('Office');
    $crud->required_fields('city');
    $crud->columns('city','country','phone','addressLine1','postalCode');

    $output = $crud->render();

    $this->_example_output($output);

    }catch(Exception $e){
    show_error($e->getMessage().' --- '.$e->getTraceAsString());
    }
    }
  • editView Office
    City:
    Orlando
    City:
    Orlando
    Phone:
    988317534
    Phone:
    988317534
    AddressLine1:
    5617 Major Blvd
    AddressLine1:
    5617 Major Blvd
    AddressLine2:
     
    AddressLine2:
     
    State:
    Florida
    State:
    Florida
    Country:
    PerĂº
    Country:
    PerĂº
    PostalCode:
    32819
    PostalCode:
    32819
    Territory:
     
    Territory: