Fixes readme formatting

This commit is contained in:
Wojciech Burda
2021-02-25 19:19:27 +01:00
parent ac154b64c7
commit d8e1bbe920
+13 -8
View File
@@ -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();
```
```