|
1 | | -## Router |
2 | | -``` |
3 | | - _____ _ _ _____ _____ _ |
4 | | - | __ \| | | | __ \ | __ \ | | |
5 | | - | |__) | |__| | |__) | ______ | |__) |___ _ _| |_ ___ _ __ |
6 | | - | ___/| __ | ___/ |______| | _ // _ \| | | | __/ _ \ '__| |
7 | | - | | | | | | | | | \ \ (_) | |_| | || __/ | |
8 | | - |_| |_| |_|_| |_| \_\___/ \__,_|\__\___|_| |
9 | | -
|
10 | | -``` |
11 | | -simple Router class for PHP. with the support of Controllers and Middlewares. |
12 | | - |
13 | | -[](https://packagist.org/packages/izniburak/router) |
14 | | -[](https://packagist.org/packages/izniburak/router) |
15 | | -[](https://packagist.org/packages/izniburak/router) |
16 | | -[](https://packagist.org/packages/izniburak/router) |
17 | | - |
18 | | -### Features |
19 | | -- Supports GET, POST, PUT, DELETE, OPTIONS, PATCH, HEAD, AJAX and ANY request methods |
20 | | -- Controllers support (Example: HomeController@about) |
21 | | -- Before and after Route Middlewares support (Example: Auth@isLogin) |
22 | | -- Static Route Patterns |
23 | | -- Dynamic Route Patterns |
24 | | -- Easy-to-use patterns |
25 | | -- Adding a new pattern supports. (with RegExp) |
26 | | -- Namespaces supports. |
27 | | -- Group Routing |
28 | | -- Custom 404 handling |
29 | | -- Debug mode (Error message open/close) |
30 | | - |
31 | | -## Install |
32 | | - |
33 | | -composer.json file: |
34 | | -```json |
35 | | -{ |
36 | | - "require": { |
37 | | - "izniburak/router": "^1" |
38 | | - } |
39 | | -} |
40 | | -``` |
41 | | -after run the install command. |
42 | | -``` |
43 | | -$ composer install |
44 | | -``` |
45 | | - |
46 | | -OR run the following command directly. |
47 | | - |
48 | | -``` |
49 | | -$ composer require izniburak/router |
50 | | -``` |
51 | | - |
52 | | -## Example Usage |
53 | | -```php |
54 | | -require 'vendor/autoload.php'; |
55 | | - |
56 | | -$router = new \Buki\Router(); |
57 | | - |
58 | | -$router->get('/', function() { |
59 | | - return 'Hello World!'; |
60 | | -}); |
61 | | - |
62 | | -$router->run(); |
63 | | -``` |
64 | | - |
65 | | -## Docs |
66 | | -Documentation page: [Buki\Router Docs][doc-url] |
67 | | - |
68 | | -## ToDo |
69 | | -- Write Test |
70 | | -- Write Documentation |
71 | | - |
72 | | -## Support |
73 | | -[izniburak's homepage][author-url] |
74 | | - |
75 | | -[izniburak's twitter][twitter-url] |
76 | | - |
77 | | -## Licence |
78 | | -[MIT Licence][mit-url] |
79 | | - |
80 | | -## Contributing |
81 | | - |
82 | | -1. Fork it ( https://github.com/izniburak/php-router/fork ) |
83 | | -2. Create your feature branch (git checkout -b my-new-feature) |
84 | | -3. Commit your changes (git commit -am 'Add some feature') |
85 | | -4. Push to the branch (git push origin my-new-feature) |
86 | | -5. Create a new Pull Request |
87 | | - |
88 | | -## Contributors |
89 | | - |
90 | | -- [izniburak](https://github.com/izniburak) İzni Burak Demirtaş - creator, maintainer |
91 | | - |
92 | | -[mit-url]: http://opensource.org/licenses/MIT |
93 | | -[doc-url]: https://github.com/izniburak/php-router/wiki |
94 | | -[author-url]: http://burakdemirtas.org |
95 | | -[twitter-url]: https://twitter.com/izniburak |
| 1 | +## Router |
| 2 | +``` |
| 3 | + _____ _ _ _____ _____ _ |
| 4 | + | __ \| | | | __ \ | __ \ | | |
| 5 | + | |__) | |__| | |__) | ______ | |__) |___ _ _| |_ ___ _ __ |
| 6 | + | ___/| __ | ___/ |______| | _ // _ \| | | | __/ _ \ '__| |
| 7 | + | | | | | | | | | \ \ (_) | |_| | || __/ | |
| 8 | + |_| |_| |_|_| |_| \_\___/ \__,_|\__\___|_| |
| 9 | +
|
| 10 | +``` |
| 11 | +simple Router class for PHP. with the support of Controllers and Middlewares. |
| 12 | + |
| 13 | +[](https://packagist.org/packages/izniburak/router) |
| 14 | +[](https://packagist.org/packages/izniburak/router) |
| 15 | +[](https://packagist.org/packages/izniburak/router) |
| 16 | +[](https://packagist.org/packages/izniburak/router) |
| 17 | + |
| 18 | +### Features |
| 19 | +- Supports GET, POST, PUT, DELETE, OPTIONS, PATCH, HEAD, AJAX and ANY request methods |
| 20 | +- Controllers support (Example: HomeController@about) |
| 21 | +- Before and after Route Middlewares support (Example: Auth@isLogin) |
| 22 | +- Static Route Patterns |
| 23 | +- Dynamic Route Patterns |
| 24 | +- Easy-to-use patterns |
| 25 | +- Adding a new pattern supports. (with RegExp) |
| 26 | +- Namespaces supports. |
| 27 | +- Group Routing |
| 28 | +- Custom 404 handling |
| 29 | +- Debug mode (Error message open/close) |
| 30 | + |
| 31 | +## Install |
| 32 | + |
| 33 | +composer.json file: |
| 34 | +```json |
| 35 | +{ |
| 36 | + "require": { |
| 37 | + "izniburak/router": "^1" |
| 38 | + } |
| 39 | +} |
| 40 | +``` |
| 41 | +after run the install command. |
| 42 | +``` |
| 43 | +$ composer install |
| 44 | +``` |
| 45 | + |
| 46 | +OR run the following command directly. |
| 47 | + |
| 48 | +``` |
| 49 | +$ composer require izniburak/router |
| 50 | +``` |
| 51 | + |
| 52 | +## Example Usage |
| 53 | +```php |
| 54 | +require 'vendor/autoload.php'; |
| 55 | + |
| 56 | +$router = new \Buki\Router(); |
| 57 | + |
| 58 | +$router->get('/', function() { |
| 59 | + return 'Hello World!'; |
| 60 | +}); |
| 61 | + |
| 62 | +$router->run(); |
| 63 | +``` |
| 64 | + |
| 65 | +## Docs |
| 66 | +Documentation page: [Buki\Router Docs][doc-url] |
| 67 | + |
| 68 | +## ToDo |
| 69 | +- Write Test |
| 70 | +- Write Documentation |
| 71 | + |
| 72 | +## Support |
| 73 | +[izniburak's homepage][author-url] |
| 74 | + |
| 75 | +[izniburak's twitter][twitter-url] |
| 76 | + |
| 77 | +## Licence |
| 78 | +[MIT Licence][mit-url] |
| 79 | + |
| 80 | +## Contributing |
| 81 | + |
| 82 | +1. Fork it ( https://github.com/izniburak/php-router/fork ) |
| 83 | +2. Create your feature branch (git checkout -b my-new-feature) |
| 84 | +3. Commit your changes (git commit -am 'Add some feature') |
| 85 | +4. Push to the branch (git push origin my-new-feature) |
| 86 | +5. Create a new Pull Request |
| 87 | + |
| 88 | +## Contributors |
| 89 | + |
| 90 | +- [izniburak](https://github.com/izniburak) İzni Burak Demirtaş - creator, maintainer |
| 91 | + |
| 92 | +[mit-url]: http://opensource.org/licenses/MIT |
| 93 | +[doc-url]: https://github.com/izniburak/php-router/wiki |
| 94 | +[author-url]: http://burakdemirtas.org |
| 95 | +[twitter-url]: https://twitter.com/izniburak |
0 commit comments