From 32e6971bc6270e2b8db8e142d39a8a7e116dc4ca Mon Sep 17 00:00:00 2001 From: William <54738571+WilliamAAK@users.noreply.github.com> Date: Wed, 16 Apr 2025 18:26:02 +0200 Subject: [PATCH] Docs: Update --- README.md | 9 ++++----- src/Route2.php | 7 +++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 238ff1e..5da8953 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,9 @@ A simple routing system for PHP web applications. ### Features: -- **Simplicity**: Easily map URLs to specific callback functions. -- **Parameters**: Flexible URL handling with parameters (e.g., `/user/$id`). -- **Middleware**: Register functions to execute **before** and **after** routes. -- **Grouping**: Organize related routes and apply group-specific middleware. +- **Parameters**: Flexible URL handling with parameters (e.g, `/user/$id`) +- **Middleware**: Register callback functions to execute **before** and **after** route callback functions. +- **Groups**: Organize routes under an optional prefix (e.g, `/admin`) and apply group-specific middleware. - **Lightweight**: A single-file, no-frills routing solution with zero dependencies. ### Example: @@ -164,7 +163,7 @@ for ($nbRequests = 0; !$maxRequests || $nbRequests < $maxRequests; ++$nbRequests The simplest way to access your routes is to put the file in your folder and run it. -For example if you request ```http://your.site/yourscript.php/your/route``` the route will be automatically adjust to `/your/route`. +For example if you request ```http://your.site/yourscript.php/your/route``` it will automatically adjust to `/your/route`. ## Rewriting requests diff --git a/src/Route2.php b/src/Route2.php index 492fafc..d68df88 100644 --- a/src/Route2.php +++ b/src/Route2.php @@ -8,10 +8,9 @@ use InvalidArgumentException; * A simple routing system for PHP web applications. * * ### Features: - * - **Simplicity**: Easily map URLs to specific callback functions. - * - **Parameters**: Flexible URL handling with parameters (e.g., `/user/$id`). - * - **Middleware**: Register functions to execute **before** and **after** routes. - * - **Grouping**: Organize related routes and apply group-specific middleware. + * - **Parameters**: Flexible URL handling with parameters (e.g, `/user/$id`) + * - **Middleware**: Register callback functions to execute **before** and **after** route callback functions. + * - **Groups**: Organize routes under an optional prefix (e.g, `/admin`) and apply group-specific middleware. * - **Lightweight**: A single-file, no-frills routing solution with zero dependencies. * * ### Example: