Fixes readme formatting
This commit is contained in:
@@ -4,16 +4,20 @@ Simple routing library for web applications.
|
||||
# Usage
|
||||
|
||||
1. Require kavalanche/security
|
||||
```bash
|
||||
|
||||
```bash
|
||||
composer require kavalanche/security
|
||||
```
|
||||
```
|
||||
|
||||
2. Create `Router` instance.
|
||||
```php
|
||||
|
||||
```php
|
||||
$router = new \Kavalanche\Router\Router();
|
||||
```
|
||||
```
|
||||
|
||||
3. Add your routes.
|
||||
```php
|
||||
|
||||
```php
|
||||
$router->get('/', function() {
|
||||
echo 'Start';
|
||||
});
|
||||
@@ -27,9 +31,10 @@ Simple routing library for web applications.
|
||||
$controller = new Kavalanche\Router\TestController();
|
||||
|
||||
$router->get('/test/post/(\d+)', [$controller, 'post']);
|
||||
```
|
||||
```
|
||||
|
||||
4. Invoke `dispatch` method.
|
||||
```php
|
||||
|
||||
```php
|
||||
$router->dispatch();
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user