PHPackages                             farmer/iroute - 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. farmer/iroute

ActiveLibrary[Framework](/categories/framework)

farmer/iroute
=============

php简单路由

011PHP

Since Aug 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/bejea/iroute)[ Packagist](https://packagist.org/packages/farmer/iroute)[ RSS](/packages/farmer-iroute/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Iroute
======

[](#iroute)

```
Iroute::get('/', function() {
  echo 'Hello world!';
});

Iroute::dispatch();
```

Iroute also supports lambda URIs, such as:

```
Iroute::get('/(:any)', function($slug) {
  echo 'The slug is: ' . $slug;
});

Iroute::dispatch();
```

You can also make requests for HTTP methods in Macaw, so you could also do:

```
Iroute::get('/', function() {
  echo 'I
