PHPackages                             midmyk/midwork2 - 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. midmyk/midwork2

ActiveLibrary[Framework](/categories/framework)

midmyk/midwork2
===============

MidWork - Simple PHP Framework

057PHP

Since Aug 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/midmyk/midwork2)[ Packagist](https://packagist.org/packages/midmyk/midwork2)[ RSS](/packages/midmyk-midwork2/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

### MidWork v2.0 Beta

[](#midwork-v20-beta)

**Requirements**: PHP 7.2 or higher, MySQL PDO

**Installation**

1. Run composer in a private directory (not accessible from the web): `composer require midmyk/midwork2:dev-master`
2. Move the contents of "public" folder to your public/web directory, for e.g. public\_html and change path to your app/Config.php in public/index.php
3. Configure HOST (website url) in app/Config.php
4. Go to your website

**Update**

To get the latest updates, just run `composer update`

### HOW-TOs: Model

[](#how-tos-model)

**How to specify custom port for my database connection?**

Uncomment or add the following to your app/Config.php $config\['db\_port'\] = 1234;

Optionally add the following to .env to have different port for local development environment db\_port = 1234

**How to select everything from a table?**

$users = Model::select\_all('users');

You will get an array with rows.

**How to select specific row from a table knowing id?**Example with users table:

$user = Model::select('users', 1); echo $user\['name'\];

**How to select specific row from a table knowing other column and value?**

$user = Model::select('users', \['name' =&gt; $name\]);

**How to insert data into a table?**

Model::insert('table', \['column\_one' =&gt; 'value1'\]);

**Delete by id**

Model::delete('users', 1);

**Delete by specific column**

Model::delete('users', 'email' =&gt; '');

**I need more advanced queries with like and joins etc**

Just use native PDO like this:

Db::conn()-&gt;prepare();

Db::conn()-&gt;execute();

Db::conn()-&gt;query();

etc.

Example:

$query = Db::conn()-&gt;query("SELECT \* FROM USERS");

$users = $query-&gt;fetchAll()

print\_r($users);

### HOW-Tos: Common

[](#how-tos-common)

You can find helper functions inside System or vendor/midmyk/midwork2/System. They are used to automate some things like showing an error message in your form or setting authentication session etc. You use them as normal php functions inside your controllers or views.

**Adding your own function**

Just create a function inside app/Common.php and it will be automatically included and available in your controllers and views.

**Overriding**

Sometimes you may not be satisfied with what one of these functions does, yet you don't wnat to create another function - you want to override already existing one. To do that, just create a function with the same name in app/Common.php

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/47a1e516bc4b12b5f44e07da953cba305acaa6cb2bac11ce28471a03824b41a3?d=identicon)[midmyk](/maintainers/midmyk)

### Embed Badge

![Health badge](/badges/midmyk-midwork2/health.svg)

```
[![Health](https://phpackages.com/badges/midmyk-midwork2/health.svg)](https://phpackages.com/packages/midmyk-midwork2)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
