leafs / api-starter
A lightweight PHP MVC framework for rapid API development.
Requires
- illuminate/console: ^8.75
- leafs/aloe: ^1.2
- leafs/auth: ^2.1
- leafs/blade: ^1.2.4
- leafs/cors: ^1.0
- leafs/db: ^2.0
- leafs/leaf: ^3.0
- leafs/logger: ^1.0.1
- leafs/mvc-core: ^1.1.6
- leafs/router: ^0.1.5
Requires (Dev)
- fakerphp/faker: ^1.16
README
Leaf API 3
Leaf API is a minimal API wrapper built on top of Leaf PHP 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.
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.
📦 Installation
You can install Leaf API v3 with the Leaf CLI
leaf create <project-name> --v3 --api
<project-name>
is your project name
You can also use Composer to install Leaf API quickly.
composer create-project leafs/api <project-name>
This will start a new Leaf API app.
🗂 Directory Structure
C:. ├───app │ ├───console │ ├───controllers │ │ └───Auth │ ├───database │ │ ├───factories │ │ ├───migrations │ │ └───seeds │ ├───helpers │ ├───models │ ├───routes │ └───views ├───config │ └───command ├───public ├───storage │ ├───app │ │ └───public │ ├───framework │ │ └───views │ └───logs └───vendor
This directory structure is a blend of Ruby on Rails and Laravel
To run your Leaf API application, use
php leaf serve
📓 Learning Leaf API
Leaf API has a very easy to understand documentation which contains information on all operations in Leaf API.
Since Leaf API runs on Leaf, you should check out the Leaf PHP Framework documentation here.
😇 Contributing
We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our contribution guide and you'll be ready to make your first pull request 🚀.
To report a security vulnerability, you can reach out to @mychidarko or @leafphp on twitter. We will coordinate the fix and eventually commit the solution in this project.
🤩 Sponsoring Leaf
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 or check the contribution page for a list of ways to contribute.
We will furthermore like to thank our existing supporters, we love you all ❤️
📃 License
The Leaf API framework is open-source software licensed under the MIT license.
💬 Stay In Touch
📓 Learning Leaf 3
- Leaf has a very easy to understand documentation which contains information on all operations in Leaf.
- You can also check out our youtube channel which has video tutorials on different topics
- We are also working on codelabs which will bring hands-on tutorials you can follow and contribute to.
😇 Contributing
We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our contribution guide and you'll be ready to make your first pull request 🚀.
To report a security vulnerability, you can reach out to @mychidarko or @leafphp on twitter. We will coordinate the fix and eventually commit the solution in this project.
Code contributors
Michael Darko |
Mauro Callegari |
🤩 Sponsoring Leaf
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 or check the contribution page for a list of ways to contribute.
And to all our existing cash/code contributors, we love you all ❤️
Cash contributors
Aaron Smith |
Peter Bogner |
Vano |