Skip to content
M MNB QuickToolHub Simple web utilities

Developer plugins

Plugin options for application-ready Excel and web tool workflows.

Extend MNB PHPExcel and MNB QuickToolHub with custom validators, row transformers, import profiles, event hooks, database targets, dashboard integrations, and framework adapters.

Plugin architecture

Register once. Reuse everywhere.

MnbExcel::plugin(function ($registry) {
    $registry->validator('valid_student_id', $rule);
    $registry->transformer('trim_strings', $cleaner);
    $registry->importProfile('students', $profile);
});
Plugin categories

Build custom behavior without changing core package code.

These plugin options keep the main package lightweight while letting real applications add business-specific rules.

01

Custom validators

Add rules like valid_student_id, exists_in_db, unique_in_db, valid_sku, valid_pincode, or domain-specific checks.

02

Row transformers

Trim strings, normalize email, convert Yes/No values, format phone numbers, clean amounts, and map labels to IDs.

03

Import profiles

Save repeatable table, header, chunk, validation, duplicate, and failed-row settings for admin import screens.

04

Event hooks

Listen to before_import, after_chunk, on_failed_row, on_import_paused, on_import_failed, and on_import_completed.

05

Database targets

Use PDO today and later connect Laravel DB, Doctrine DBAL, repository classes, API targets, or external data services.

06

Framework adapters

Keep core framework-neutral, then add optional packages for Laravel, CodeIgniter, Slim, Symfony, or custom MVC apps.

Recommended plugin package split

  • mnb/mnb-phpexcel — core package
  • mnb/mnb-phpexcel-laravel — Laravel service provider, config, queue examples
  • mnb/mnb-phpexcel-codeigniter — controller and config helpers
  • mnb/mnb-phpexcel-slim — route examples and middleware-friendly responses
  • mnb/mnb-phpexcel-dashboard — optional import dashboard UI templates

Best real app plugin flow

  1. Validate upload safely.
  2. Preflight analyze XLSX size and features.
  3. Select normal, streaming, or CLI/queue method.
  4. Transform and validate rows in chunks.
  5. Insert to database with resume/checkpoint support.
  6. Show dashboard progress and failed-row downloads.