Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leafsphp/leafmvc
MVC "Framework" created from Leaf PHP Framework
https://github.com/leafsphp/leafmvc
leaf leaf-php-framework leafmvc leafphp mvc mvc-framework php php-framework php-mvc-framework
Last synced: 3 months ago
JSON representation
MVC "Framework" created from Leaf PHP Framework
- Host: GitHub
- URL: https://github.com/leafsphp/leafmvc
- Owner: leafsphp
- Created: 2019-10-31T18:49:35.000Z (over 5 years ago)
- Default Branch: v3.x
- Last Pushed: 2024-03-05T17:51:33.000Z (11 months ago)
- Last Synced: 2024-04-14T09:58:50.098Z (10 months ago)
- Topics: leaf, leaf-php-framework, leafmvc, leafphp, mvc, mvc-framework, php, php-framework, php-mvc-framework
- Language: PHP
- Homepage: https://mvc.leafphp.dev
- Size: 1.57 MB
- Stars: 44
- Watchers: 6
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Leaf MVC
[![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)
[![License](https://poser.pugx.org/leafs/mvc/license)](https://packagist.org/packages/leafs/mvc)Leaf MVC is a lightweight but feature-rich MVC framework built on top of [leaf php](https://leafphp.dev). It gives you the simplicity of Leaf and it's modules with the structure of an MVC framework. Leaf MVC is a great choice for building applications that scale without the complexity of most modern frameworks.
## 📦 Installation
You can install Leaf MVC with the [Leaf CLI](https://cli.leafphp.dev)
```sh
leaf create --mvc
```Or for a more personalized installation, you can add `--custom` to the command
```sh
leaf create --mvc --custom
```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:
```bash
composer create-project leafs/mvc
```Note that `` 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.
## 🗂 Directory Structure
```bash
C:.
├───app
│ ├───console
│ ├───controllers
│ ├───database
│ │ ├───factories
│ │ ├───migrations
│ │ ├───schema
│ │ └───seeds
│ ├───helpers
│ ├───models
│ ├───routes
│ └───views
│ ├───css
│ └───errors
├───config
├───lib
├───public
│ └───assets
│ ├───css
│ └───img
├───storage
│ ├───app
│ │ └───public
│ ├───framework
│ │ └───views
│ └───logs
└───vendor
```This directory structure is our opinionated way of organizing your MVC application. It is a blend of the best practices from different frameworks like Ruby on Rails and Laravel and some of our own experience building applications.
To run your Leaf MVC application, use
```bash
php leaf serve
```Or with the Leaf CLI
```bash
leaf serve
```## 📓 Learning Leaf MVC
- Leaf MVC has a very easy to understand [documentation](https://leafphp.dev/docs/mvc/) which contains information on all operations in Leaf MVC.
- Since Leaf MVC runs on Leaf, you should check out the Leaf PHP Framework documentation [here](https://leafphp.dev).
- You can also check out our [youtube channel](https://www.youtube.com/channel/UCllE-GsYy10RkxBUK0HIffw) which has video tutorials on different topics## 😇 Contributing
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 🚀.
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.
## 🤩 Sponsoring Leaf
We 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.
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.
And to all our [existing cash/code contributors](https://leafphp.dev#sponsors), we love you all ❤️