Introduction
Quick Start
Basic Concepts
Understanding Routing
Intercepting Requests
Module Fundamentals
Database Operations
Templates
Helpers
Form Handling
Form Validation
Working With Files
Image Manipulation
Working With Dates & Times
Language Control
Security
Your First Module
In Trongate, everything is a module. Your first module will be a simple page that says hello.
1. Create the Module Directory
Inside your modules/ directory, create a folder called hello/:
2. Create the Controller
Create a file called Hello.php inside the hello/ directory:
3. Create the View
Inside hello/views/, create a file called greeting.php:
4. View It in Your Browser
Navigate to:
You should see "Hello, world!" displayed on the page.
That’s all there is to it. Module controllers extend the Trongate class, views are plain PHP files, and URLs map directly to your module and method names. No configuration, no routing setup, no scaffolding commands.
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.