Skip to content

Commit fde4bba

Browse files
committed
chore: update readme
1 parent af18318 commit fde4bba

1 file changed

Lines changed: 17 additions & 39 deletions

File tree

readme.md

Lines changed: 17 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,22 @@ Leaf UI is a PHP library for building user interfaces.
1111

1212
Leaf UI doesn't need a new compiler or any extensive compiling, it's just the same old PHP you write everyday; as such, you can build full scalable Leaf UI powered apps or just sprinkle Leaf UI into your existing HTML/PHP code.
1313

14-
v0.2.0 of Leaf UI is currently in development. It's a complete rewrite of the library and will be released soon. It comes with a lot of new features and a new API. Leaf UI v0.2.0 will allow you to build full scalable Leaf UI powered apps, write reactive UIs all in PHP. You can think of it as a PHP version of React.
14+
v0.2.0 of Leaf UI is currently in development, it is a complete rewrite of the library that comes with a lot of new features and a new API. Leaf UI v0.2.0 will allow you to build full scalable Leaf UI powered apps, write reactive UIs all in PHP. You can think of it as a PHP version of React.
1515

1616
## Installing Leaf UI
1717

18-
Like most PHP libraries, we recommend installing Leaf UI with [composer](//getcomposer.org). Just open up your console and type:
18+
Like most PHP libraries, we recommend installing Leaf UI with the [Leaf CLI](https://cli.leafphp.dev):
1919

2020
```bash
21-
composer require leafs/ui
21+
leaf install ui@dev-next
2222
```
2323

24-
Or install the next version of Leaf UI:
24+
Or with [composer](//getcomposer.org). Just open up your console and type:
2525

2626
```bash
27-
composer require leafs/ui@dev-next
27+
composer require leafs/ui:dev-next
2828
```
2929

30-
This will install Leaf UI into your application. You don't have to worry about bloating your application: Leaf UI has no external dependencies.
31-
3230
After this, you can use all of Leaf UI's methods and components.
3331

3432
View the [documentation here](https://staging.ui.leafphp.dev/)
@@ -59,14 +57,17 @@ class Test2 extends Component
5957

6058
public function render()
6159
{
62-
return Core::createElement('body', [], [
63-
Core::createElement('div', [], [
64-
Core::createElement('div', [], 'Static text'),
65-
Core::createElement('button', ['@click' => 'decrement'], '-'),
66-
Core::createElement('h1', [], $this->count),
67-
Core::createElement('button', ['@click' => 'increment'], '+'),
68-
]),
69-
]);
60+
// your UI will go here
61+
return '
62+
<body>
63+
<div>
64+
<div>Static text</div>
65+
<button @click="decrement">-</button>
66+
<h1>' . $this->count . '</h1>
67+
<button @click="increment">+</button>
68+
</div>
69+
</body>
70+
';
7071
}
7172
}
7273
```
@@ -85,7 +86,7 @@ require_once __DIR__ . '/vendor/autoload.php';
8586
echo Core::render(new Test2());
8687
```
8788

88-
The most beautiful part about all this is that it can run outside Leaf. It is completely independent of Leaf and can be used in any PHP application.
89+
The most beautiful part about all this is that it can run outside Leaf. It is completely independent of Leaf or any other framework and can be used in any PHP application.
8990

9091
_This file is still being updated!_
9192

@@ -107,33 +108,10 @@ We are glad to have you. All contributions are welcome! To get started, familiar
107108

108109
To report a security vulnerability, you can reach out to [@mychidarko](https://twitter.com/mychidarko) or [@leafphp](https://twitter.com/leafphp) on twitter. We will coordinate the fix and eventually commit the solution in this project.
109110

110-
### Code contributors
111-
112-
<table>
113-
<tr>
114-
<td align="center">
115-
<a href="https://github.com/mychidarko">
116-
<img src="https://avatars.githubusercontent.com/u/26604242?v=4" width="120px" alt=""/>
117-
<br />
118-
<sub>
119-
<b>Michael Darko</b>
120-
</sub>
121-
</a>
122-
</td>
123-
</tr>
124-
</table>
125-
126111
## 🤩 Sponsoring Leaf
127112

128113
Your cash contributions go a long way to help us make Leaf even better for you. You can sponsor Leaf and any of our packages on [open collective](https://opencollective.com/leaf) or check the [contribution page](https://leafphp.dev/support/) for a list of ways to contribute.
129114

130115
And to all our existing cash/code contributors, we love you all ❤️
131116

132117
View the [sponsors](https://leafphp.dev/support/) page to see all our sponsors.
133-
134-
## 🤯 Links/Projects
135-
136-
- [Leaf Docs](https://leafphp.dev)
137-
- [Skeleton Docs](https://skeleton.leafphp.dev)
138-
- [Leaf CLI Docs](https://cli.leafphp.dev)
139-
- [Aloe CLI Docs](https://leafphp.dev/aloe-cli/)

0 commit comments

Comments
 (0)