Introducing Included Modules
Trongate v1 hid everything in engine/.
Mysterious. Untouchable. Slightly terrifying.
We burned that to the ground.
Database interaction? File uploads? Validation? Templates?
All modules now.
Here's all the modules that are included with the Trongate framework. Click any module name for more details.
- login ← universal login for any user table
- db ← full database power, no ORM
- file ← upload, download, delete
- flashdata ← flash messages for redirects
- form ← build & process forms
- image ← resize, crop, watermark
- language ← multi-language support
- pagination ← beautiful links in 3 seconds
- string_service ← string manipulation made easy
- templates ← layouts & partials
- trongate_administrators ← admin panel (create, edit, delete users)
- trongate_email ← send HTML and plain text emails via SMTP
- trongate_control ← inspect running modules
- trongate_security ← CSRF, XSS, headers, the works
- trongate_tokens ← one-time tokens
- url ← URL helper methods
- utilities ← utility helpers for everyday tasks
- validation ← stop bad data, fast
- welcome ← the module that renders your homepage
Why This Rules
- Open any included module → plain PHP you can actually read.
- Don’t like how it works? Change it. It’s yours.
- Want your own version? Replace the folder. Done.
- Even AI can understand the whole framework now. No magic. No 47 layers of abstraction.
The engine/ directory is now microscopic. Routing only.
Everything else? Modules.
Using Them (Zero Drama)
Loading modules from controller files is easy:
// From any controller – it just works
$rows = $this->db->get('products');
$is_valid = $this->validation->run($post);
$upload_info = $this->file->upload($config);
$resized = $this->image->resize('uploads/pic.jpg', 800, 600);You can also call modules from within view files. For example:
<?= Modules::run('pagination/show', $pagination_data) ?>No registration. No config files. No tears.
Want to tweak a module? Just edit it. Or delete it and drop in your own.
This is Native PHP ownership.
We're continually improving the Trongate documentation. If anything is incorrect, unclear, incomplete, or could be better, we'd genuinely appreciate your input.
Share your thoughts in the Documentation Feedback.