Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ienaga/PhalconRouter
Phalcon Routering for Yaml
https://github.com/ienaga/PhalconRouter
phalcon phalcon-router php yaml
Last synced: about 2 months ago
JSON representation
Phalcon Routering for Yaml
- Host: GitHub
- URL: https://github.com/ienaga/PhalconRouter
- Owner: ienaga
- License: mit
- Created: 2016-10-12T07:45:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-08T21:41:49.000Z (almost 6 years ago)
- Last Synced: 2024-08-04T01:05:53.203Z (5 months ago)
- Topics: phalcon, phalcon-router, php, yaml
- Language: PHP
- Size: 22.5 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-phalcon - Phalcon Routing for Yaml - Routing can be easily configured with yaml (Routing)
README
# Phalcon Router for Yaml
[![Build Status](https://travis-ci.org/ienaga/PhalconRouter.svg?branch=master)](https://travis-ci.org/ienaga/PhalconRouter)
[![Latest Stable Version](https://poser.pugx.org/ienaga/phalcon-router-for-yaml/v/stable)](https://packagist.org/packages/ienaga/phalcon-router-for-yaml) [![Total Downloads](https://poser.pugx.org/ienaga/phalcon-router-for-yaml/downloads)](https://packagist.org/packages/ienaga/phalcon-router-for-yaml) [![Latest Unstable Version](https://poser.pugx.org/ienaga/phalcon-router-for-yaml/v/unstable)](https://packagist.org/packages/ienaga/phalcon-router-for-yaml) [![License](https://poser.pugx.org/ienaga/phalcon-router-for-yaml/license)](https://packagist.org/packages/ienaga/phalcon-router-for-yaml)
## Version
```
PHP: 7.0.x, 7.1.x, 7.2.x
Phalcon: 3.x
```## Composer
```json
{
"require": {
"ienaga/phalcon-router-for-yaml": "2.*"
}
}
```## routing.yml sample
### min
```yaml
mypage_index: # /mypage/index
```### max
```yaml
mypage_index:
module: frontend # Default null
method: [ GET, POST ] # Default GET
url: /mypage/{user_id}
controller: mypage
action: index
namespace: \ProjectName\Module
```## app/config/services.php
```php
$di->set("router", function () {
return \Phalcon\Mvc\Router\Adapter\Yaml::load(
new \Phalcon\Config\Adapter\Yaml(APP_PATH ."/directory/routing.yml")
);
}, true);
```