Category: PHP, api

Frameworks are good stuff, at least for middle to big enterprise applications. On the other hand, there are valid use cases where you probably don’t need all this advanced stuff.

Here are some examples of routing rules: Looks pretty neat, easy to create, easy to read.

The Dispatcher doesn’t do much more than that it parses the request and delegate it to the Router: As we probably don’t want to access the Router directly, we need to expose a delegating function for adding a route: Alright, the routing and dispatching is ready.

In less than 5 KB we have achieved to create a simple request dispatcher with declarative routing and base classes for extending when implementing custom actions.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners