Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zaxwebs/clara
A custom built MVC PHP 7 framework.
https://github.com/zaxwebs/clara
composer framework model-view-controller mvc oop pdo php php-di php7
Last synced: 25 days ago
JSON representation
A custom built MVC PHP 7 framework.
- Host: GitHub
- URL: https://github.com/zaxwebs/clara
- Owner: zaxwebs
- Created: 2019-11-29T10:03:38.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-25T03:47:14.000Z (about 5 years ago)
- Last Synced: 2024-11-10T01:23:05.981Z (3 months ago)
- Topics: composer, framework, model-view-controller, mvc, oop, pdo, php, php-di, php7
- Language: PHP
- Homepage:
- Size: 412 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 💠Clara
An MVC framework built with PHP 7.## Installation
Install a local copy with the instructions below.### Install LAMP stack
It is assumed you already know how to install a LAMP stack. I recommend doing so with Laragon as it greatly simplifies the task.
Laragon is a portable, isolated, fast & powerful universal development environment for PHP (with MySQL).
You can download it here: https://laragon.org/download/### Install Composer
Installation instructions: https://getcomposer.org/download/### Setup Server
1. Create a dedicated directory (and configure) for hosting Clara files.
2. Clone or copy Clara files to the directory.## Usage
* Clara is mostly self-documenting.
* Config files are in ```src/setup/```.
* Core files are at ```src/core/```.
* Add controller and models in ```src/app/controllers``` and ```src/app/models``` respectively.## Project Structure
Clara is built on the following structural architecture:
```bash
/clara
/public # Assets like images, CSS and JS files here
/src # Clara source code
/app # Dedicated directory for controllers and models
/controllers # Add your controllers here
/models # Add your models here
/core # Clara core classes
/setup # Dedicated directory for configuration
config.php # Configure globals here
routes.php # Configre routes here
/vendor # Composer files and 3rd party packages
.htaccess # Routes all traffic to index.php
index.php # Initializes app cycle
```## Motivation
Clara was built with the purpose of understanding how major PHP frameworks operate under the hood. Most frameworks like Laravel implement techniques that can seem like "magic" unless you actually implement them yourself, an example being utilizing reflection API to plug in dependencies. Clara has helped me so much with familarizing myself with quite a few advanced concepts in the PHP & OOP world.