From 3e175d234dd7610e84e50919f8a6512b66508ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Mon, 19 Oct 2015 00:41:09 +0200 Subject: [PATCH 1/3] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 3867cb4..e21a301 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,12 @@ SimpleRouter::group(['prefix' => 'v1', 'middleware' => '\MyWebsite\Middleware\So SimpleRouter::get('/answers/{id}', 'ControllerAnswers@show') ->where(['id' => '[0-9]+'); + /** + * This example will route url when matching the regular expression to the method. + * For example route: /ajax/music/world -> ControllerAjax@process (parameter: music/world) + */ + SimpleRouter::all('/ajax', 'ControllerAjax@process')->match('ajax\\/([A-Za-z0-9\\/]+)'); + // Resetful ressource SimpleRouter::ressource('/rest', 'ControllerRessource'); From ed66bc919b3377f8f9dc5781bd8b76d0184bf374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Mon, 19 Oct 2015 00:43:54 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index e21a301..96d55e5 100644 --- a/README.md +++ b/README.md @@ -190,3 +190,26 @@ http://laravel.com/docs/5.1/routing ## Easily extendable The router can be easily extended to customize your needs. + +## License +The MIT License (MIT) + +Copyright (c) [year] [fullname] + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 06202612d471618c1c7d88665e2a720e4ecd5c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Mon, 19 Oct 2015 00:44:28 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 96d55e5..50411c2 100644 --- a/README.md +++ b/README.md @@ -191,10 +191,9 @@ http://laravel.com/docs/5.1/routing ## Easily extendable The router can be easily extended to customize your needs. -## License -The MIT License (MIT) +## The MIT License (MIT) -Copyright (c) [year] [fullname] +Copyright (c) 2015 Simon Sessingø / simple-php-router Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal