{"id":13405028,"url":"https://github.com/leafsphp/leaf","last_synced_at":"2025-04-10T10:47:55.944Z","repository":{"id":37413121,"uuid":"214705101","full_name":"leafsphp/leaf","owner":"leafsphp","description":"🍁 The easiest way to create clean, simple but powerful web apps and APIs quickly","archived":false,"fork":false,"pushed_at":"2024-10-15T14:05:05.000Z","size":1002,"stargazers_count":1100,"open_issues_count":2,"forks_count":68,"subscribers_count":25,"default_branch":"v3.x","last_synced_at":"2024-10-29T15:34:04.289Z","etag":null,"topics":["api","framework","framework-php","leaf","leafphp","mvc","php","php-framework","php-micro-framework","rest-framework"],"latest_commit_sha":null,"homepage":"https://leafphp.dev","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leafsphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"leaf","github":"leafsphp"}},"created_at":"2019-10-12T19:41:14.000Z","updated_at":"2024-10-28T02:25:32.000Z","dependencies_parsed_at":"2023-12-16T13:05:16.983Z","dependency_job_id":"d936f22f-43f3-4c55-9372-9f90f3eb8c6a","html_url":"https://github.com/leafsphp/leaf","commit_stats":{"total_commits":552,"total_committers":14,"mean_commits":39.42857142857143,"dds":0.09782608695652173,"last_synced_commit":"87841a7b2a30b9b72e87e7b7357afc79ccbd18d6"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fleaf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fleaf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fleaf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fleaf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leafsphp","download_url":"https://codeload.github.com/leafsphp/leaf/tar.gz/refs/heads/v3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247160395,"owners_count":20893823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","framework","framework-php","leaf","leafphp","mvc","php","php-framework","php-micro-framework","rest-framework"],"created_at":"2024-07-30T19:01:54.734Z","updated_at":"2025-04-10T10:47:55.928Z","avatar_url":"https://github.com/leafsphp.png","language":"PHP","readme":"\u003c!-- markdownlint-disable no-inline-html --\u003e\n\u003cp align=\"center\"\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \u003cimg src=\"https://leafphp.dev/logo-circle.png\" height=\"100\"/\u003e\n  \u003cbr\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eLeaf PHP\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://packagist.org/packages/leafs/leaf\"\n    \u003e\u003cimg\n      src=\"https://poser.pugx.org/leafs/leaf/v/stable\"\n      alt=\"Latest Stable Version\"\n  /\u003e\u003c/a\u003e\n  \u003ca href=\"https://packagist.org/packages/leafs/leaf\"\n    \u003e\u003cimg\n      src=\"https://poser.pugx.org/leafs/leaf/downloads\"\n      alt=\"Total Downloads\"\n  /\u003e\u003c/a\u003e\n  \u003ca href=\"https://packagist.org/packages/leafs/leaf\"\n    \u003e\u003cimg\n      src=\"https://poser.pugx.org/leafs/leaf/license\"\n      alt=\"License\"\n  /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\nLeaf is a slim and lightweight PHP framework focused on developer experience, usability, and high-performance code. It introduces a cleaner and much simpler structure to the PHP language while maintaining it's flexibility. With a simple structure and a shallow learning curve, it's an excellent way to rapidly build powerful and high performant web apps and APIs.\n\n## Basic Usage\n\nAfter [installing](#installation) Leaf, create an _index.php_ file.\n\n```php\n\u003c?php\n\nrequire __DIR__ . '/vendor/autoload.php';\n\napp()-\u003eget('/', function () {\n  response()-\u003ejson([\n    'message' =\u003e 'Hello World!'\n  ]);\n});\n\napp()-\u003erun();\n```\n\nYou may quickly test this using the Leaf CLI:\n\n```bash\nleaf serve\n```\n\nOr with the built-in PHP server:\n\n```bash\nphp -S localhost:5500\n```\n\n## Why Leaf?\n\nWhen it comes to building web applications, there are numerous tools and frameworks at your disposal. Nevertheless, we are convinced that Leaf is the optimal selection for developing powerful, web applications and APIs.\n\nWhile PHP frameworks speed up web development, they come with challenges like a steep learning curve, potential performance overhead, and stricter code maintenance. They can be rigid, limiting flexibility, and often tie you to a specific ecosystem, making it hard to use unsupported packages. Additionally, frameworks may introduce unused code, leading to bloat and reduced performance.\n\nLeaf addresses these challenges with an easy learning curve, making it accessible to both beginners and experienced devs. It is lightweight, and boosts developer productivity by simplifying usage with global functions.\n\nBeyond this, Leaf is modular, allowing developers to install only necessary features while maintaining compatibility with other libraries and frameworks. Additionally, Leaf is scalable, working seamlessly from development to production with minimal configuration.\n\n## Installation\n\nYou can create a new Leaf app using the [Leaf CLI](https://leafphp.dev/docs/cli/)\n\n```bash\nleaf create \u003cproject-name\u003e --basic\n```\n\n`\u003cproject-name\u003e` is the name of your project\n\nYou can also use [Composer](https://getcomposer.org/) to install Leaf 3 in your project quickly.\n\n```bash\ncomposer require leafs/leaf\n```\n\n## ✈️ The Leaf Ecosystem (Libs \u0026 Frameworks)\n\n| Project                                          | Status                                                                                                                                                                                                                                         | Description                                            |\n| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |\n| [leaf](https://github.com/leafsphp/leaf)         | [![Latest Stable Version](https://poser.pugx.org/leafs/leaf/v/stable)](https://packagist.org/packages/leafs/leaf) [![Total Downloads](https://poser.pugx.org/leafs/leaf/downloads)](https://packagist.org/packages/leafs/leaf)                 | Create websites and APIs quickly                       |\n| [leafmvc](https://github.com/leafsphp/leafmvc)   | [![Latest Stable Version](https://poser.pugx.org/leafs/mvc/v/stable)](https://packagist.org/packages/leafs/mvc) [![Total Downloads](https://poser.pugx.org/leafs/mvc/downloads)](https://packagist.org/packages/leafs/mvc)                     | An MVC wrapper for leaf      |\n| [cli](https://github.com/leafsphp/cli)           | [![Latest Stable Version](https://poser.pugx.org/leafs/cli/v/stable)](https://packagist.org/packages/leafs/cli) [![Total Downloads](https://poser.pugx.org/leafs/cli/downloads)](https://packagist.org/packages/leafs/cli)                     | CLI for creating \u0026 interacting with your leaf apps     |\n\nYou can find a full list of all modules on the [modules documentation](https://leafphp.dev/modules/)\n\n## 💬 Stay In Touch\n\n- [Twitter](https://twitter.com/leafphp)\n- [Join the forum](https://github.com/leafsphp/leaf/discussions/37)\n- [Chat on discord](https://discord.com/invite/Pkrm9NJPE3)\n\n## 📓 Learning Leaf PHP\n\n- Leaf has a very easy to understand [documentation](https://leafphp.dev) which contains information on all operations in Leaf.\n- You can also check out our [youtube channel](https://www.youtube.com/channel/UCllE-GsYy10RkxBUK0HIffw) which has video tutorials on different topics\n- You can also learn from [codelabs](https://leafphp.dev/codelabs/) and contribute as well.\n\n## 😇 Contributing\n\nWe 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 🚀.\n\nTo 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.\n\n## 🤩 Sponsoring Leaf\n\nWe are committed to keeping Leaf open-source and free, but maintaining and developing new features now requires significant time and resources. As the project has grown, so have the costs, which have been mostly covered by the team. To sustain and grow Leaf, we need your help to support full-time maintainers.\n\nYou 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.\n\nAnd to all our [existing cash/code contributors](https://leafphp.dev#sponsors), we love you all ❤️\n","funding_links":["https://opencollective.com/leaf","https://github.com/sponsors/leafsphp"],"categories":["PHP","\u003ca name=\"L\"\u003e \u003c/a\u003eL"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafsphp%2Fleaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleafsphp%2Fleaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafsphp%2Fleaf/lists"}