Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/minsuwai/php-framework-thinking
A comprehensive project demonstrating PHP MVC development from scratch, covering core programming concepts, database interactions, routing, and architectural patterns.
https://github.com/minsuwai/php-framework-thinking
composer mysql pdo php
Last synced: 15 days ago
JSON representation
A comprehensive project demonstrating PHP MVC development from scratch, covering core programming concepts, database interactions, routing, and architectural patterns.
- Host: GitHub
- URL: https://github.com/minsuwai/php-framework-thinking
- Owner: minsuwai
- Created: 2025-01-07T17:14:50.000Z (29 days ago)
- Default Branch: main
- Last Pushed: 2025-01-19T12:19:25.000Z (18 days ago)
- Last Synced: 2025-01-19T13:30:12.797Z (17 days ago)
- Topics: composer, mysql, pdo, php
- Language: PHP
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP Framework Thinking
This is a simple PHP framework for learning and understanding the basics of routing and controllers in PHP.
## Requirements
- PHP 7.4 or higher
- Composer
- XAMPP or any other local server setup## Installation
1. Clone the repository:
```sh
git clone https://github.com/yourusername/php-framework-thinking.git
```Make sure to replace `https://github.com/yourusername/php-framework-thinking.git` with the actual URL of your repository.
2. Navigate to the project directory:
```sh
cd php-framework-thinking
```3. Start the PHP built-in server:
```sh
php -S localhost:8000
```4. Open your browser and navigate to `http://localhost:8000`.
## Project Structure
- : The entry point of the application.
- : Handles the routing of the application.
- : Bootstraps the application.
- : Defines the routes for the application.
- : Contains the controller files.## Defining Routes
Routes are defined in the file. Here is an example:
```php
$router->get('', 'controllers/index.php');
$router->get('about', 'controllers/about.php');
$router->post('contact', 'controllers/contact.php');
```