|
1 | 1 | <p align="center"> |
2 | 2 | <br><br> |
3 | 3 | <img src="https://leafphp.dev/logo-circle.png" height="100"/> |
4 | | - <br> |
| 4 | + <br><br> |
5 | 5 | </p> |
6 | 6 |
|
7 | | -# Leaf API |
| 7 | +# Leaf API 3 <BETA> |
8 | 8 |
|
9 | 9 | [](https://packagist.org/packages/leafs/api) |
10 | 10 | [](https://packagist.org/packages/leafs/api) |
11 | 11 | [](https://packagist.org/packages/leafs/api) |
12 | 12 |
|
13 | | -Leaf API is a minimal MVC wrapper built on top of Leaf PHP which allows you to build APIs with Leaf, faster and simpler than ever before. |
| 13 | +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. |
| 16 | + |
| 17 | +## 📦 Installation |
14 | 18 |
|
15 | | -v2 of leaf API packs in a ton of new features with enhanced usability for existing features. It also has better binding with other Leaf libraries as well as external libraries. Also since Leaf doesn't enforce particular systems like `Facades` in laravel, you can port in any valid PHP library and it should work fine. |
| 19 | +You can install Leaf API v3 with the [Leaf CLI](https://cli.leafphp.dev) |
16 | 20 |
|
17 | | -## Installation |
| 21 | +```sh |
| 22 | +leaf create <project-name> --v3 --api |
| 23 | +``` |
| 24 | + |
| 25 | +`<project-name>` is your project name |
18 | 26 |
|
19 | | -It's recommended that you use [Composer](https://getcomposer.org/) to install Leaf. |
| 27 | +You can also use [Composer](https://getcomposer.org/) to install Leaf API quickly. |
20 | 28 |
|
21 | 29 | ```bash |
22 | 30 | composer create-project leafs/api <project-name> |
23 | 31 | ``` |
24 | 32 |
|
25 | | -This will start a new Leaf api project. |
| 33 | +This will start a new Leaf API app. |
26 | 34 |
|
27 | | -## Basic Info |
| 35 | +## 🗂 Directory Structure |
28 | 36 |
|
29 | 37 | ```bash |
30 | 38 | C:. |
31 | | -├── app |
32 | | -│ ├── console |
33 | | -│ ├── controllers |
34 | | -│ │ └── Auth |
35 | | -│ ├── database |
36 | | -│ │ ├── factories |
37 | | -│ │ ├── migrations |
38 | | -│ │ ├── schema |
39 | | -│ │ └── seeds |
40 | | -│ ├── helpers |
41 | | -│ ├── models |
42 | | -│ ├── routes |
43 | | -│ └── views |
44 | | -├── config |
45 | | -├── lib |
46 | | -├── public |
47 | | -├── storage |
48 | | -│ ├── app |
49 | | -│ │ └── public |
50 | | -│ ├── framework |
51 | | -│ │ └── views |
52 | | -│ └── logs |
53 | | -└── vendor |
| 39 | +├───app |
| 40 | +│ ├───console |
| 41 | +│ ├───controllers |
| 42 | +│ │ └───Auth |
| 43 | +│ ├───database |
| 44 | +│ │ ├───factories |
| 45 | +│ │ ├───migrations |
| 46 | +│ │ └───seeds |
| 47 | +│ ├───helpers |
| 48 | +│ ├───models |
| 49 | +│ ├───routes |
| 50 | +│ └───views |
| 51 | +├───config |
| 52 | +│ └───command |
| 53 | +├───public |
| 54 | +├───storage |
| 55 | +│ ├───app |
| 56 | +│ │ └───public |
| 57 | +│ ├───framework |
| 58 | +│ │ └───views |
| 59 | +│ └───logs |
| 60 | +└───vendor |
54 | 61 | ``` |
55 | 62 |
|
56 | 63 | This directory structure is a blend of Ruby on Rails and Laravel |
57 | 64 |
|
58 | | -To run your Leaf api application, use |
| 65 | +To run your Leaf API application, use |
59 | 66 |
|
60 | 67 | ```bash |
61 | 68 | php leaf serve |
62 | 69 | ``` |
63 | 70 |
|
64 | | -## Learning LeafAPI |
| 71 | +## 📓 Learning Leaf API |
| 72 | + |
| 73 | +Leaf API has a very easy to understand [documentation](https://api.leafphp.dev) which contains information on all operations in Leaf API. |
| 74 | + |
| 75 | +Since Leaf API runs on Leaf, you should check out the Leaf PHP Framework documentation [here](https://leafphp.dev). |
| 76 | + |
| 77 | +## 😇 Contributing |
| 78 | + |
| 79 | +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 🚀. |
| 80 | + |
| 81 | +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. |
| 82 | + |
| 83 | +## 🤩 Sponsoring Leaf |
65 | 84 |
|
66 | | -LeafAPI has a very easy to understand [documentation](https://leafphp.netlify.app/#/leaf-api/) which contains information on all operations in LeafAPI. |
| 85 | +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. |
67 | 86 |
|
68 | | -Since LeafAPI runs on Leaf, you can check out the Leaf PHP Framework documentation [here](https://leafphp.netlify.app). |
| 87 | +We will furthermore like to thank our existing supporters, we love you all ❤️ |
69 | 88 |
|
70 | | -## License |
| 89 | +## 📃 License |
71 | 90 |
|
72 | | -The LeafAPI framework is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT). |
| 91 | +The Leaf API framework is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT). |
73 | 92 |
|
74 | | -## View LeafAPI's docs [here](https://leafphp.netlify.app/#/leaf-api/) |
| 93 | +## Links |
75 | 94 |
|
76 | | -## View Leaf's docs [here](https://leafphp.netlify.app) |
| 95 | +- [Leaf Docs](https://leafphp.dev) |
| 96 | +- [Leaf API Docs](https://api.leafphp.dev) |
| 97 | +- [Leaf CLI Docs](https://cli.leafphp.dev) |
| 98 | +- [Aloe CLI Docs](https://leafphp.dev/aloe-cli/) |
0 commit comments