simple-php-router
simple-php-router copied to clipboard
Simple, fast and yet powerful PHP router that is easy to get integrated and in any project. Heavily inspired by the way Laravel handles routing, with both simplicity and expand-ability in mind.
I use laragon for local development and running I first noticed something like `url('home.test')->getAbsoluteUrl()` only returned the path (no scheme, no host) After trying with `request()->getUrl()->getAbsoluteUrl()` the scheme showed here,...
I've added a new method suitable for preflight requests in JavaScript to solve a problem I encountered. I needed to accept the `OPTIONS` method, but I didn't want to use...
Allows usage of comma separated values as middleware parameters ```php Router::post('/purchase', [CableTvController::class, 'purchase']) ->addMiddleware(PinVerified::class.',value_1,value_2'); ``` OR ```php Router::post('/purchase', [CableTvController::class, 'purchase']) ->addMiddleware('App\Middlewares\TestMiddleware,value_1,value_2'); ```
## Description This pull request adds support for handling CORS preflight requests in the routing system. The router will respond to OPTIONS requests only when the route actually exists and...
I've done some research, and find out the reason is here. I'm not sure if its a bug or it was intended to work that way.
So recently someone accessed mysite.com/%c0 and it would crash the router: ``` Code: 0: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated Location: /home/matej/web/XX/public_html/vendor/pecee/simple-router/src/Pecee/Http/Url.php#460 Trace: #0...