DASPRiD / Dash

Flexible PSR-7 compliant HTTP router
BSD 2-Clause "Simplified" License
29 stars 9 forks source link

More compact syntax #57

Closed bakura10 closed 8 years ago

bakura10 commented 9 years ago

I call this the "expressive routing language".

return [
    'routes' => [
        ['GET|POST /users AS users', UserController::class] => [
            ['GET|PUT|DELETE /:id WITH id=[0-9]+ AS user', UserController::class, 'myAction'],
            ['GET /tweets AS tweets', TweetController::class]
        ]
    ]
];