Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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');
```