library anrouter
A simple and small routing library
anujsinghwd/anrouter
A simple and small routing library
- Thursday, March 29, 2018
- by anujsinghwd
- Repository
- 1 Watchers
- 1 Stars
- 0 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
anrouter
A simple and small PHP Routing, (*1)
Installation
composer require anujsinghwd/anrouter
Usage
- First configure
.htaccess
jsx
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
-
$anrouter = new AnRouter()
, (*2)
-
Simply make function according to your route, (*3)
Example
Parameter Handling
- Pass with request
jsx
$anrouter->get('method_name', array('agr1' => $val))
- Getting the Parameter in function
jsx
function method_name($param)
{
echo $param;
}