You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,17 @@ It does one thing only. It routs URI/URL requests (Such as: `https://example.com
6
6
7
7
## Installation
8
8
9
-
Current version is 1.1.0
9
+
Current version is 1.1.2
10
10
11
-
`composer require digi-brains/ya-router 1.1.1`
11
+
`composer require digi-brains/ya-router 1.1.2`
12
12
13
13
## Overview
14
14
15
-
YaRouter assumes 3 things.
15
+
YaRouter assumes 2 things.
16
16
17
17
1. You are, through your server or document root config file, directing all traffic through a single entry point/bootstrap file; such as `index.php`.
18
18
19
-
2.You have a directory structure for your view files that reflects your information arcitecture.[1](#allviews)
19
+
2.Your views file-names reflect your URL structure. For example, If your URL is `example.com/foo/bar/my-page`, YaRouter expects to find the view for this page at `path/to/templates/foo/bar/my-page.html`.[1](#anytype).
20
20
21
21
Example:
22
22
@@ -43,7 +43,6 @@ Example:
43
43
44
44
```
45
45
46
-
3. Your views file names reflect your URL structure. For example, If your URL is `example.com/foo/bar/my-page`, YaRouter expects to find the view for this page at `path/to/templates/foo/bar/my-page.html`. [2](#anytype)
47
46
48
47
## Documentation
49
48
@@ -59,17 +58,17 @@ Then `use` the YaRouter\Router.
59
58
60
59
Just `include` the Router.php script
61
60
62
-
Next define your parameters:
61
+
**Next define your parameters:**
63
62
64
63
1.`$views` This is the path to the main directory where your views are stored.
65
64
66
65
2.`$type` This is the _type_ of view file you are calling (extension only). E.g., .html, .php, etc...
67
66
68
67
3.`$default` The name of the default view file (without the extension). Typically used for home or index page.
69
68
70
-
Finally, create a `new Router()` object with your parameters and then call the `get_view` method.
69
+
**Finally, create a**`new Router()`**object with your parameters and then call the**`get_view`**method.**
0 commit comments