Compare commits

..

No commits in common. "main" and "v1.0.0" have entirely different histories.
main ... v1.0.0

2 changed files with 5 additions and 5 deletions

View File

@ -58,7 +58,7 @@ Here's a basic getting started example:
```php
<?php
require __DIR__.'/../vendor/autoload.php';
require __DIR__.'/vendor/autoload.php';
use Wilaak\Http\Route2;
@ -80,7 +80,7 @@ Boot your application once and keep it in memory by using [worker mode](https://
ignore_user_abort(true);
require __DIR__.'/../vendor/autoload.php';
require __DIR__.'/vendor/autoload.php';
use Wilaak\Http\Route2;
@ -131,7 +131,7 @@ Route2::match('get|post', '/', function() {
// matches any method you like
});
Route2::form('/', function() {
Route2::forms('/', function() {
// matches GET and POST methods
});

View File

@ -309,7 +309,7 @@ class Route2
public static function dispatch(?string $method = null, ?string $uri = null): bool
{
$method = strtoupper($method ?? $_SERVER['REQUEST_METHOD']);
$uri = rawurldecode(strtok($uri ?? self::getRelativeRequestUri(), '?'));
$uri = rawurldecode($uri = strtok($uri ?? self::getRelativeRequestUri(), '?'));
$routes = self::matchRoute($uri);