PHPackages                             elementphp/element - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. elementphp/element

ActiveLibrary[Framework](/categories/framework)

elementphp/element
==================

Lightweight PHP Framework

1.2.2(7y ago)012BSD-3-ClausePHP

Since Sep 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/elementphp/element)[ Packagist](https://packagist.org/packages/elementphp/element)[ RSS](/packages/elementphp-element/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

 [ ![element](https://camo.githubusercontent.com/679abbfd6e77f8071520208838009cc47ca0db4075d600db4e74f9969926e2c9/68747470733a2f2f656c656d656e747068702e636f6d2f696d616765732f6c6f676f2e706e67)](https://elementphp.com)

==========================================================================================================================================================================================================================

[](#------)

#### MVC Framework for PHP

[](#mvc-framework-for-php)

 [ ![php version 7 plus](https://camo.githubusercontent.com/66730bf63ef05d162ddde5f678eff1ef91af6f816570981e7105a0a2d3a1c51a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372532422d677265656e2e7376673f6c6f6e6743616368653d74727565267374796c653d666c61742d737175617265) ](https://img.shields.io/badge/php-7%2B-green.svg?longCache=true&style=flat-square) [ ![stable version 1.2.2](https://camo.githubusercontent.com/9ae1f82eeb533de1151667c032a1ef30a63ca9ce5e6a50abd8e1e21c370edc10/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461626c652d312e322e322d677265656e2e7376673f6c6f6e6743616368653d74727565267374796c653d666c61742d737175617265) ](https://img.shields.io/badge/stable-1.2.2-green.svg?longCache=true&style=flat-square) [ ![open issues](https://camo.githubusercontent.com/37561b353b66a0ff70af00e05d36a6d688360e3516f9d09037071638cb2e17ab/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f656c656d656e747068702f656c656d656e742e7376673f6c6f6e6743616368653d66616c7365267374796c653d666c61742d737175617265) ](https://img.shields.io/github/issues/paul7337/element.svg?longCache=false&style=flat-square) [ ![licence bsd 3](https://camo.githubusercontent.com/5ce1e2218736f6a1d33c91c11da9abfcd007abdbc4a667a0cd78d1ed20f087d4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e63652d627364332d677265656e2e7376673f6c6f6e6743616368653d74727565267374796c653d666c61742d737175617265) ](https://img.shields.io/badge/licence-bsd3-green.svg?longCache=true&style=flat-square) [ ![contributions welcome](https://camo.githubusercontent.com/939bc9a9d677678ff00275fcc04980c59cc9a4c4467aa1b18099f1838dc35af8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6e747269627574696f6e732d77656c636f6d652d677265656e2e7376673f6c6f6e6743616368653d74727565267374796c653d666c61742d737175617265) ](https://img.shields.io/badge/contributions-welcome-green.svg?longCache=true&style=flat-square)

What is it?
-----------

[](#what-is-it)

A lightweight MVC framework for PHP that can be easily deployed and updated within any hosting.

Getting Started
---------------

[](#getting-started)

#### Prerequisites

[](#prerequisites)

- **Apache webserver** (must have mod\_rewrite enabled)
- **PHP V7+** (probably works on lower versions, but untested).

#### GitHub

[](#github)

Clone or download repository.

#### Composer

[](#composer)

1. If you haven't already done so, install Composer
2. Create a directory in your webspace to contain your files
3. Create a file named composer.json. See example below (name is optional and can be changed)
4. Open command prompt or terminal, cd to directory and input the following command (without quotes)

    i. Windows: 'composer install'

    ii. Linux/Mac: 'php composer.phar install'

```
{
    "name" : "element",
    "require": {
        "elementphp/element": "dev-master"
	},
    "minimum-stability": "dev",
    "prefer-stable": true
}
```

Quick Start
-----------

[](#quick-start)

Navigate to ***app &gt; configuration &gt; configuration.php*** and update **host** and **root** in the **domain** section of the $config array.

E.g On localhost in a subdirectory named element ...
host = 'localhost'
root = 'element'

```
"domain" =>[
	"host" => "localhost/",
	"root" => "element"
],
```

Documentation
-------------

[](#documentation)

**Full documentation can be found [here](https://elementphp.com/documentation)**

#### Model

[](#model)

(Example.php)

```
