PHPackages                             0xcrypto/simple - 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. 0xcrypto/simple

AbandonedArchivedProject[Framework](/categories/framework)

0xcrypto/simple
===============

The &lt;Simple&gt; Framework.

v0.1.1(6y ago)014MITPHP

Since Mar 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/0xcrypto/simple)[ Packagist](https://packagist.org/packages/0xcrypto/simple)[ RSS](/packages/0xcrypto-simple/feed)WikiDiscussions dev Synced 5d ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

Simple Framework
================

[](#simple-framework)

A Simple PHP framework to help you make websites and web applications faster. [Fork](../../fork)

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

[](#getting-started)

Simple Framework is kinda DIY framework. To keep everything light, Simple Framework is not packed with lots of features. It just gives you enough ground to build further. As simple as it can get, the Simple Framework is primarily developed to be compatible with Shared Hosting Providers. I have been working with clients who need their websites to be served on shared hosting. While I do love building with Laravel, it soon becomes an overkill as the project grows but resources don't. Simple Framework aims to give the same feel of Laravel but with quite less resource consumptions and overwhelming complexity. Simple Framework comes with Blade Templating Engine, Idiorm, Alto Router and very helpful `dd` function.

### Prerequisites

[](#prerequisites)

All you need is PHP 7.1+ and MySQL (optional).

### Installing

[](#installing)

1. Install required packages with composer

```
$ composer create-project 0xcrypto/simple-framework
```

2. Run the development server

```
$ php -S localhost:8000
```

3. Visit `http://localhost:8000` and see Simple Framework in action.

Development
-----------

[](#development)

Simple Framework uses MVC and you can tinker with everything. The `Simple` directory contains the controllers and models. The views are outside in `views` directory. These views are blade templates. Routes are written in `routes.php` as an array which are splated into the Alto Router. Configurations are divided into two parts - `config.php` and `dotenv.php`. Declarations in `config.php` becomes global constants available in all over the application. On the other hand, declarations in `dotenv.php` is accessible via config function. I know it should be the other way. I will fix it in next commit.

Deployment
----------

[](#deployment)

While primarily made for shared hosting, Simple Framework can be used in any kind of enviornment as far as PHP is installed. The process is same for all kind of hosting. Just upload the codebase to your hosting and change the `config.php` with correct MySQL credentials.

It is okay if you upload vendor directory as well. If composer is available on your hosting environment, it is not recommended to upload vendor directory. Install packages using composer on the server.

```
$ composer install
```

It is recommended to keep everything out of `public_html` directory except the `assets` directory, `index.php` and `.htaccess`. If you do this, make sure you change the following lines in `index.php`:

```
