PHPackages                             adil-jaafar/picophp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. adil-jaafar/picophp

ActiveLibrary[Framework](/categories/framework)

adil-jaafar/picophp
===================

Ultra-léger, conçu pour aller à l'essentiel.

v1.0.2(8mo ago)1151MITPHP

Since May 1Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/adil-jaafar/picophp)[ Packagist](https://packagist.org/packages/adil-jaafar/picophp)[ RSS](/packages/adil-jaafar-picophp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (4)Used By (1)

picoPHP - Your Lightweight and Flexible PHP Framework
=====================================================

[](#picophp---your-lightweight-and-flexible-php-framework)

picoPHP is a minimalistic yet powerful PHP framework designed for rapid development and ease of use. It leverages file-based routing, dependency injection, and middleware to provide a clean and organized structure for your web applications.

Key Features
------------

[](#key-features)

- **File-Based Routing:** Define your routes simply by creating `routes.php` files within your application's directory structure.
- **Dependency Injection:** Automatically inject services (like Request, Response, Env, DB) into your route handlers for easy access and testing.
- **Path Parameters:** Easily capture dynamic path segments as parameters within your routes.
- **Middleware:** Implement reusable logic that can be applied before and after route handlers, allowing you to easily manage authentication, authorization, data validation, and more.
- **HTTP Method Handling:** Easily define handlers for different HTTP methods (GET, POST, PUT, DELETE, etc.)

Getting Started
---------------

[](#getting-started)

1. **Installation:** Use Composer to install picoPHP.

    ```
    composer create-project adil-jaafar/picophp-template your-app-name
    ```
2. **Directory Structure:** Organize your application code within the `app` directory.

    ```
    app/
    ├── foo/
    │   ├── bar/
    │   │   └── routes.php   # Defines routes for /foo/bar
    │   └── routes.php       # Defines routes for /foo
    └── routes.php           # Defines routes for the root (/)

    ```
3. **Routing with `routes.php`:** Create `routes.php` files to define your routes.

    ```
