PHPackages                             footup/framework - 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. [Database &amp; ORM](/categories/database)
4. /
5. footup/framework

ActiveProject[Database &amp; ORM](/categories/database)

footup/framework
================

FootUp MVC Framework: A Rich Featured LightWeight PHP MVC Framework

0.1.6(3y ago)981BSD-3-ClausePHPPHP &gt;=7.4||^8.0

Since Mar 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/faustfizz/footup)[ Packagist](https://packagist.org/packages/footup/framework)[ RSS](/packages/footup-framework/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)DependenciesVersions (7)Used By (0)

Footup MVC PHP Framework
========================

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

 [![Footup Logo](core/footup-ascii-art.png)](core/footup-ascii-art.png)FOOTUP MVC FRAMEWORK - 0.1.7-alpha.9
------------------------------------

[](#footup-mvc-framework---017-alpha9)

 [ ![follow on Twitter](https://camo.githubusercontent.com/da2893e262602a9f8d798f4b60bc21c47c8a7d7fe8d7dc972e3d3935bb43ebc6/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f4a6f686e6e79466175737466697a7a3f7374796c653d736f6369616c266c6f676f3d74776974746572) ](https://twitter.com/intent/follow?screen_name=JohnnyFaustfizz) [ ![](https://camo.githubusercontent.com/f35c87b36ac6f1761ba82dc06a8da61f59680047417f64ecb9c8fb26dac127ae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f666175737466697a7a2f666f6f7475703f7374796c653d736f6369616c) ](https://github.com/faustfizz/footup/) [ ![](https://camo.githubusercontent.com/163527adbf2a61d72e7f770d5ec495c7c4933d9ffaf62b6d42f8128fc22eb977/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d69742d61637469766974792f6d2f666175737466697a7a2f666f6f747570) ](https://github.com/badges/shields/pulse) [ ![](https://camo.githubusercontent.com/f1e80a0a3265790c02bc105be8966675eb3232cc4524d48aba2ee268342b2075/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f666175737466697a7a2f666f6f7475703f696e636c7564655f70726572656c6561736573) ](https://github.com/faustfizz/footup/releases) [ ![](https://camo.githubusercontent.com/74ad839aeff1cea030c3aa39e578ede581964619ed8999300d6ce13e79afeb0d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f666175737466697a7a2f666f6f7475703f696e636c7564655f70726572656c6561736573) ](https://github.com/faustfizz/footup/releases) [ ![](https://camo.githubusercontent.com/7695fd03a687ea66ab100f381e617e85b7772643458e402bb4d9724c51408d58/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d5e372e342d677265656e) ](https://github.com/faustfizz/footup) [ ![](https://camo.githubusercontent.com/879870e6b7a01dc067d751e32369e504f51ca277c584e5bd800a3d6adecd8855/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f666175737466697a7a2f666f6f747570) ](https://github.com/faustfizz/footup) [ ![](https://camo.githubusercontent.com/e9db7a14d87ec71e98d70704ed9d2303724fa3d125645dc00f84cbec13b5fc13/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f666175737466697a7a2f666f6f747570) ](https://github.com/faustfizz/footup)

A Rich Featured LightWeight PHP MVC Framework :

- CLI support for generating **Controller**, **Model**, **Middle**, **Migration**, **Seeder**, **Assets** and **View** files ( [adhocore/php-cli](https://github.com/adhocore/php-cli) modified and used thanks :) )
- Translation support
- Config using PHP File or .env (Rename env to .env)
- Request
- Response
- Validator (Form Validation - Not validating UploadedFile) Thanks to [pdscopes/php-form-validator](https://github.com/pdscopes/php-form-validator)
- Pagination (Pagination and Pagination View) Thanks to [iranianpep/paginator](https://github.com/iranianpep/paginator)
- Session
- Email (CodeIgniter 4 Email Class)
- Routing
- Controller AND Middleware (But here we call it just Middle and are specific)
- Model RelationShips ($hasOne, $hasMany, $belongsTo, $belongsToMany)
- Model QueryBuilder
- Model Events CallBacks
- Files (Upload File)
- Extensible (You can integrate any library you want and you can add (news folders and class) in the App Directory using psr4 autoloading mecanism)

### ReadMe should be updated -- (Soon i'll create the docs website for FootUp PHP MVC Framework)

[](#readme-should-be-updated----soon-ill-create-the-docs-website-for-footup-php-mvc-framework)

---

Directories tree
----------------

[](#directories-tree)

```
FOOTUP MVC Framework
├── app
│   ├── Config
│   │   ├── Autoload.php
│   │   ├── Config.php
│   │   ├── Constants.php
│   │   ├── Email.php
│   │   ├── Form.php
│   │   ├── Fuel.php
│   │   ├── Paginator.php
│   │   └── Routes.php
│   ├── Controller
│   │   ├── BaseController.php
│   │   └── Home.php
│   ├── Functions.php
│   ├── Lang
│   ├── Libs
│   ├── Middle
│   │   └── Maintenance.php
│   ├── Migration
│   ├── Model
│   │   └── Contact.php
│   ├── Seed
│   └── View
│       └── home.php
├── composer.json
├── core
│   ├── Boot.php
│   ├── Cli
│   │   ├── Commands
│   │   │   ├── Assets.php
│   │   │   ├── Controller.php
│   │   │   ├── Middle.php
│   │   │   ├── Migfree.php
│   │   │   ├── Migrate.php
│   │   │   ├── MigrateTrait.php
│   │   │   ├── Migrown.php
│   │   │   ├── Migrup.php
│   │   │   ├── Model.php
│   │   │   ├── Multiple.php
│   │   │   ├── Scaffold.php
│   │   │   ├── Seeder.php
│   │   │   ├── Seed.php
│   │   │   ├── Serve.php
│   │   │   └── View.php
│   │   ├── Exception
│   │   │   ├── Exception.php
│   │   │   ├── InvalidArgumentException.php
│   │   │   ├── InvalidParameterException.php
│   │   │   └── RuntimeException.php
│   │   ├── Helper
│   │   │   ├── InflectsString.php
│   │   │   ├── Normalizer.php
│   │   │   ├── OutputHelper.php
│   │   │   └── Shell.php
│   │   ├── Input
│   │   │   ├── Argument.php
│   │   │   ├── Command.php
│   │   │   ├── Groupable.php
│   │   │   ├── Option.php
│   │   │   ├── Parameter.php
│   │   │   ├── Parser.php
│   │   │   └── Reader.php
│   │   ├── IO
│   │   │   └── Interactor.php
│   │   ├── Konsole.php
│   │   ├── logo
│   │   ├── logo_txt
│   │   ├── Output
│   │   │   ├── Color.php
│   │   │   ├── Cursor.php
│   │   │   ├── Table.php
│   │   │   └── Writer.php
│   │   └── Tpl
│   │       ├── Controller.tpl
│   │       ├── Middle.tpl
│   │       ├── Migrate.tpl
│   │       ├── Model.tpl
│   │       ├── Seed.tpl
│   │       └── View.tpl
│   ├── Config
│   │   ├── Autoload.php
│   │   ├── Config.php
│   │   ├── DotEnv
│   │   │   ├── DotEnv.php
│   │   │   └── Exception
│   │   │       ├── Exception.php
│   │   │       └── InvalidPathException.php
│   │   ├── Email.php
│   │   └── Mime.php
│   ├── Controller.php
│   ├── Database
│   │   ├── DbConnection.php
│   │   ├── Migration
│   │   │   └── Migration.php
│   │   ├── Migration.php
│   │   ├── QueryBuilder.php
│   │   ├── Schema
│   │   │   ├── Column.php
│   │   │   ├── ForeignKey.php
│   │   │   ├── IndexColumn.php
│   │   │   ├── Index.php
│   │   │   ├── Schema.php
│   │   │   └── Table.php
│   │   ├── Seeder
│   │   │   └── Seeder.php
│   │   └── Seeder.php
│   ├── Debug
│   │   ├── Contracts
│   │   │   └── HandlersInterface.php
│   │   ├── Exceptions
│   │   │   ├── CompileErrorException.php
│   │   │   ├── CompileWarningException.php
│   │   │   ├── CoreErrorException.php
│   │   │   ├── CoreWarningException.php
│   │   │   ├── DepricatedException.php
│   │   │   ├── NoticeException.php
│   │   │   ├── ParseErrorException.php
│   │   │   ├── RecoverableErrorException.php
│   │   │   ├── StrictErrorException.php
│   │   │   ├── UserDeprecatedException.php
│   │   │   ├── UserErrorException.php
│   │   │   ├── UserNoticeException.php
│   │   │   ├── UserWarningException.php
│   │   │   └── WarningException.php
│   │   ├── Handlers.php
│   │   ├── HandlersSetter.php
│   │   ├── Reporter.php
│   │   ├── resources
│   │   │   ├── assets
│   │   │   │   ├── css
│   │   │   │   │   ├── custom.min.css
│   │   │   │   │   ├── enlighterjs.min.css
│   │   │   │   │   └── spectre.min.css
│   │   │   │   └── js
│   │   │   │       ├── custom.min.js
│   │   │   │       └── enlighterjs.min.js
│   │   │   └── views
│   │   │       └── 500.php
│   │   ├── Support
│   │   │   └── functions.php
│   │   └── View.php
│   ├── Files
│   │   ├── File.php
│   │   └── FileSystem.php
│   ├── footup-ascii-art.png
│   ├── Footup.php
│   ├── Functions.php
│   ├── Html
│   │   ├── Form.php
│   │   └── Html.php
│   ├── Http
│   │   ├── Request.php
│   │   ├── Response.php
│   │   └── Session.php
│   ├── I18n
│   │   ├── Exceptions
│   │   │   └── I18nException.php
│   │   ├── TimeDifference.php
│   │   └── Time.php
│   ├── Lang
│   │   ├── fr
│   │   │   ├── core.json
│   │   │   ├── date.json
│   │   │   ├── db.json
│   │   │   ├── email.json
│   │   │   ├── file.json
│   │   │   ├── http.json
│   │   │   ├── paginator.json
│   │   │   ├── validator.json
│   │   │   └── view.json
│   │   └── Lang.php
│   ├── Model.php
│   ├── Orm
│   │   ├── BaseModel.php
│   │   └── ModelQueryBuilder.php
│   ├── Paginator
│   │   ├── AbstractPaginator.php
│   │   ├── Page.php
│   │   ├── PaginatorException.php
│   │   ├── PaginatorInterface.php
│   │   ├── Paginator.php
│   │   └── View
│   │       └── default.php
│   ├── Routing
│   │   ├── Middle.php
│   │   ├── Route.php
│   │   └── Router.php
│   └── Utils
│       ├── Arrays
│       │   ├── Arrayable.php
│       │   ├── ArrDots.php
│       │   ├── Arr.php
│       │   ├── Collection.php
│       │   └── Dots.php
│       ├── ClassLocator.php
│       ├── Shared.php
│       ├── Str.php
│       └── Validator
│           ├── Validate.php
│           └── Validator.php
├── env
├── footup
├── LICENSE
├── public
│   ├── assets
│   │   ├── avatar.jpg
│   │   ├── css
│   │   │   └── style.css
│   │   └── js
│   │       └── script.js
│   ├── error
│   │   ├── 404.html
│   │   └── 500.html
│   ├── favicon.svg
│   ├── index.php
│   └── uploads
├── README.md
└── server.php

```

Description
-----------

[](#description)

FOOTUP MVC Framework focus primarily to speed and minimalistic. It's **250 Kb zip**, **148 kb xz**. It render withing **0.001 seconds** (I used a PHP 8.0.7 environment to write and test it).

My goal is doing a thing that i'm the first person that use it with ease. I added some features that help me working faster on my all day's work.

Requirements
------------

[](#requirements)

Yo ! You can download this directly and use it without no need to external dependancy. It support composer libraries but i have not published **footup** yet to packagist.

So you need:

- *PDO extension*
- *mb\_string*
- *intl*
- *json*

WalkThrough
-----------

[](#walkthrough)

### CLI

[](#cli)

For now I added just generators commands

To show help:

```
nuka@hacker_pc:~$ php footup
```

To generate controller:

```
nuka@hacker_pc:~$ php footup controller controllerName
```

Don't be so shy, try yourself

### Request

[](#request)

The request and the router class are the **BMW Motors**They hold many thing helpful. Here how we use the request:

#### You are in the controller ? use like this :

[](#you-are-in-the-controller--use-like-this-)

```
// using get function to get the page=3 present in the url
$this->request->get("page");

// you can use like this to get the page
$this->request->page;

// What ? you typing enough ? and that ?
request()->page;

// And What ? how to get file with name: image ?
// You can use as below
$this->request->image; // or $this->request->file('image')

// And What if image[] as multiple files ?
// You can use as below
$this->request->files('image');

# Yes you can access the request using the global function request()
```

#### But Yes, with the request you can validate data via validator like this :

[](#but-yes-with-the-request-you-can-validate-data-via-validator-like-this-)

```
// using get function to validate the page=3 present in the url
$this->request->withGetInput()->validate(["page" => "is:int"]);

// What ? you typing enough ? and that ?
request()->withGetInput()->validate(["page" => "is:int"]);

# Yes you can access the request using the global function request()
```

#### *Don't be so shy, explore the request class, your editor will autocomplete*

[](#dont-be-so-shy-explore-the-request-class-your-editor-will-autocomplete)

### The Response object is available in the controller :

[](#the-response-object-is-available-in-the-controller-)

```
// using get function to validate the page=3 present in the url
$this->response->json(["page" => 2]); // second parameter to echo directly

# Yes you can access the response using the global function response()
```

### The Session

[](#the-session)

This is a shared class so the data withing it remain the same, here is the example :

```
// using set function to set session value
$this->session->set(["page" => 2]); // or $this->session->page = 2

// What ? you typing enough ? and that ?
session("page", 2); // session()->set("page", 2); or session()->page = 2;

// What ? i want to get the page ?
// So
session("page"); // session()->get("page"); or session()->page;

# Yes you can access the session using the global function session() as shown
```

### Validator :

[](#validator-)

If you validate data with validator, the validate function return **TRUE** if all passed and **FALSE** otherwise

```
// Via request
// with post data
$this->request->withPostInput()->validate(["page" => "is:int"]);

// With post and get data
request()->withInput()->validate(["page" => "is:int"]);

// With other data
request()->with(["page" => 2])->validate(["page" => "is:int"]);

// So how to get Error ?
// Simple
validator()->getError("page"); // request()->getValidator()->getErrors(); to grab all

# Yes you can access the validator using the global function validator()
# You can validate using the global function validate() too
```

I will write documentation if if if .... LOL -- If you can do it, help me !
---------------------------------------------------------------------------

[](#i-will-write-documentation-if-if-if--lol----if-you-can-do-it-help-me-)

### I think i don't like writing LOL

[](#i-think-i-dont-like-writing-lol)

### Using the Model

[](#using-the-model)

```
