🔀 PHP Routing Framework
Welcome to php-routing-framework — your ultimate multi-functional PHP routing engine designed for modern web apps! 🚀
📂 Project Structure
/php-route-core
│── /app # Core PHP code (Routing Engine)
│ ├── /Core # Framework core files
│ │ ├── Router.php # Manages URL routing
│ │ ├── Request.php # Handles user requests
│ │ ├── Response.php # Sends responses
│
│── /routes # Routing files
│ ├── web.php # Frontend routes
│ ├── api.php # Backend API routes
│
│── /public # Public directory (Entry point)
│ ├── index.php # Initializes the routing system
│
│── /tests # Unit tests
│ ├── RouterTest.php # Tests for the routing system
│
│── .env # Environment variables (if needed)
│── .htaccess # Apache server configuration (Pretty URLs)
│── composer.json # PHP dependencies (Composer)
│── README.md # Project documentation
💡 Why Choose This Framework?
- Lightweight & Fast ⚡ — Minimal footprint, optimized for speed.
- Multi-functional Routing 🎯 — Supports GET, POST, PUT, DELETE routes and more.
- Clean Code Structure 📂 — Modular design: clear separation of concerns.
- Middleware Ready 🛡️ — Add pre/post-processing for requests (auth, logging).
- REST API Friendly 🌐 — Easily manage API endpoints alongside web routes.
- Custom Response Handling 📤 — Send JSON, HTML, redirects, or custom headers.
- Environment Config Support 🌍 —
.env ready for flexible deployment.
- Unit Tested 🧪 — Stability ensured with built-in tests.
📌 Installation
1️⃣ Clone the repository
git clone https://github.com/Iqbolshoh/php-routing-framework
2️⃣ Install dependencies using Composer
composer install
3️⃣ Ensure Apache is properly configured
Make sure .htaccess is enabled for pretty URLs.
🚀 Usage
➕ Adding a New Route
To add a new route, modify the routes/web.php file:
Router::get('/', function () {
View::render('home');
});
Router::get('/about', function () {
echo "<h1>Hello this is About page</h1>";
});
🖥 Technologies Used

📜 License
This project is open-source and available under the MIT License.
🤝 Contributing
🎯 Contributions are welcome! If you have suggestions or want to enhance the project, feel free to fork the repository and submit a pull request.
📬 Connect with Me
💬 I love meeting new people and discussing tech, business, and creative ideas. Let’s connect! You can reach me on these platforms:
评论