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
{{ message }}
This repository was archived by the owner on Oct 8, 2024. It is now read-only.
Leaf API is a minimal API wrapper built on top of [Leaf PHP](https://leafphp.dev) which allows you to build APIs with Leaf, faster and simpler than ever before. Leaf API provides an simple and opinionated structure with a tons of functionality built in.
14
-
15
-
It is built on Leaf 3 which makes it even more lightweight and faster than earlier versions, but comes with a ton of upgrades and security fixes.
13
+
Leaf API is a lightweight but feature-rich MVC framework built on top of [leaf php](https://leafphp.dev). It provides everything you need to build APIs with Leaf, faster and simpler than ever before.
16
14
17
15
## 📦 Installation
18
16
19
17
You can install Leaf API v3 with the [Leaf CLI](https://cli.leafphp.dev)
20
18
21
19
```sh
22
-
leaf create <project-name> --v3 --api
20
+
leaf create <project-name> --api
23
21
```
24
22
25
-
`<project-name>` is your project name
23
+
Or for a more personalized installation, you can add `--custom` to the command
24
+
25
+
```sh
26
+
leaf create <project-name> --api --custom
27
+
```
26
28
27
-
You can also use [Composer](https://getcomposer.org/) to install Leaf API quickly.
29
+
You can also use [Composer](https://getcomposer.org/)if you don't want to use the Leaf CLI, although we recommend using the CLI for a better experience:
28
30
29
31
```bash
30
32
composer create-project leafs/api <project-name>
31
33
```
32
34
33
-
This will start a new Leaf API app.
35
+
Note that `<project-name>` is the name of the project you want to create, and that will be your folder name. You can also use `.` to install in the current directory.
34
36
35
37
## 🗂 Directory Structure
36
38
39
+
```bash
37
40
```bash
38
41
C:.
39
42
├───app
40
43
│ ├───console
41
44
│ ├───controllers
42
-
│ │ └───Auth
43
45
│ ├───database
44
46
│ │ ├───factories
45
47
│ │ ├───migrations
48
+
│ │ ├───schema
46
49
│ │ └───seeds
47
50
│ ├───helpers
48
51
│ ├───models
49
52
│ ├───routes
50
53
│ └───views
51
54
├───config
52
-
│ └───command
55
+
├───lib
53
56
├───public
57
+
│ └───assets
54
58
├───storage
55
59
│ ├───app
56
60
│ │ └───public
@@ -70,9 +74,13 @@ php leaf serve
70
74
71
75
## 📓 Learning Leaf API
72
76
73
-
Leaf API has a very easy to understand [documentation](https://api.leafphp.dev) which contains information on all operations in Leaf API.
77
+
- Leaf API has a very easy to understand [documentation](https://api.leafphp.dev) which contains information on all operations in Leaf API.
78
+
79
+
- Since Leaf API runs on Leaf, you should check out the Leaf PHP Framework documentation [here](https://leafphp.dev).
74
80
75
-
Since Leaf API runs on Leaf, you should check out the Leaf PHP Framework documentation [here](https://leafphp.dev).
81
+
- You can also check out our [youtube channel](https://www.youtube.com/channel/UCllE-GsYy10RkxBUK0HIffw) which has video tutorials on different topics
82
+
83
+
- We are also working on [codelabs](https://codelabs.leafphp.dev) which will bring hands-on tutorials you can follow and contribute to.
76
84
77
85
## 😇 Contributing
78
86
@@ -86,91 +94,15 @@ Your cash contributions go a long way to help us make Leaf even better for you.
86
94
87
95
We will furthermore like to thank our existing supporters, we love you all ❤️
88
96
89
-
## 📃 License
90
-
91
-
The Leaf API framework is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).
92
-
93
-
94
97
## 💬 Stay In Touch
95
98
96
99
- [Twitter](https://twitter.com/leafphp)
97
100
- [Join the forum](https://github.com/leafsphp/leaf/discussions/37)
98
101
- [Chat on discord](https://discord.com/invite/Pkrm9NJPE3)
99
102
100
-
## 📓 Learning Leaf 3
101
-
102
-
- Leaf has a very easy to understand [documentation](https://leafphp.dev) which contains information on all operations in Leaf.
103
-
- You can also check out our [youtube channel](https://www.youtube.com/channel/UCllE-GsYy10RkxBUK0HIffw) which has video tutorials on different topics
104
-
- We are also working on codelabs which will bring hands-on tutorials you can follow and contribute to.
105
-
106
-
## 😇 Contributing
107
-
108
-
We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our [contribution guide](https://leafphp.dev/community/contributing.html) and you'll be ready to make your first pull request 🚀.
109
-
110
-
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.
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.
140
-
141
-
And to all our existing cash/code contributors, we love you all ❤️
0 commit comments