Skip to content

Commit d02beb0

Browse files
committed
simplified readme
1 parent a0afa22 commit d02beb0

1 file changed

Lines changed: 4 additions & 26 deletions

File tree

README.md

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,16 @@ Tipsy is an MVW (Model, View, Whatever) PHP micro framework inspired by [Angular
1616

1717
See [Examples](https://github.com/tipsyphp/tipsy/wiki/Examples) for more detailed examples. See [Documentation](https://github.com/tipsyphp/tipsy/wiki) for more information.
1818

19-
#### View Template Example
20-
2119
###### index.php
2220
```php
23-
$app->home(function($Scope, $View) {
24-
$Scope->user = 'Mai Tai';
25-
$View->display('hello');
21+
$app->home(function($View) {
22+
$View->display('index', [user => 'crystal']);
2623
});
2724
```
2825

29-
###### hello.phtml
26+
###### index.phtml
3027
```phtml
31-
<h1>Hello <?=$user?>!</h1>
32-
```
33-
34-
#### API Example
35-
36-
###### index.php
37-
38-
```php
39-
$app->post('drink/:id', function($Params, $Request, $Maitai) {
40-
$Maitai
41-
->load($Params->id)
42-
->serialize($Request->request())
43-
->save();
44-
echo $Maitai->json()
45-
});
46-
```
47-
48-
###### POST /drink/1?rating=5&name=maitai
49-
```
50-
{"id": 1, "name": "maitai", "rating": 5}
28+
<h1>Hello <?=$user?></h1>
5129
```
5230

5331
---

0 commit comments

Comments
 (0)