PHPackages                             ajurgensen/php-magic - 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. ajurgensen/php-magic

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

ajurgensen/php-magic
====================

phpMagic: Propel ORM &amp; Bootstrap integrated to make building Pages, Forms &amp; Lists easy

1233PHP

Since Feb 14Pushed 9y ago2 watchersCompare

[ Source](https://github.com/ajurgensen/phpMagic)[ Packagist](https://packagist.org/packages/ajurgensen/php-magic)[ RSS](/packages/ajurgensen-php-magic/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

phpMagic

Takes Propel ORM Object and creates a bootstrap form - Also build lists and whole pages

- does XSS security
- Adds related tables automagiclly
- Option to add other tables as needed (many-to-many)
- Renaming of colum names
- Excluding colums
- Client Side Validation
- Server Side Validation
- Validation Callbacks
- Use to create lists of objects
- Use to create whole pages (with auth etc)

Installation: composer require ajurgensen/phpMagic

Some ways of using phpMagic

```
//Edit for User
use \ajurgensen\phpMagic\formMagic;
if (!$userid || !$user = UserQuery::create()->findOneById($userid))
{
  $user = new User();
}
$names['UGLY_COLUM_NAME'] = 'This is a nicer name';
$options['FM_EXCLUDE'] = array ('PASSWORDHASH','UPDATED_AT','CREATED_AT');
$fm = new formMagic($user,$options,$names);
if ($fm->entitySaved)
{
    //all good, user updated - now redirect to some other page (entity is saved, etc)
}else
{
    //Show the form
    echo $fm->html;
}

```

Another Way

```
//Build a page with a list of objects
use \ajurgensen\phpMagic\formMagic;
use \ajurgensen\phpMagic\pageMagic;
$menu = array(
'Menu Point One' =>array('subpoint one' => '/one/one','subpoint two' => '/one/two'),
'Menu Point Two' =>array('subpoint one' => '/two/one','subpoint two' => '/two/two'));
$pm = new pageMagic('List Entities');
$pm->addMenu($menu);
$entites = EntityQuery::create()->find();
foreach($entites as &$entity)
{
    $entity->link = "/edit/entity/" . $entity->getId();
}
$options['LM_LINK'] = array('name');
$options['LM_ADDNEW'] = "/edit/entity/0";
$lm = new listMagic($entities,$options);
if ($lm->HTMLready)
{
    $pm->addHtml($lm->getHTML());
}
$pm->finalize();
}

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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/b87e8f43e62b3582c7bc1491ddd317a8ac732f83c11dc6d0495dd1aff51ab04a?d=identicon)[ajurgensen](/maintainers/ajurgensen)

---

Top Contributors

[![ajurgensen](https://avatars.githubusercontent.com/u/13265511?v=4)](https://github.com/ajurgensen "ajurgensen (98 commits)")

### Embed Badge

![Health badge](/badges/ajurgensen-php-magic/health.svg)

```
[![Health](https://phpackages.com/badges/ajurgensen-php-magic/health.svg)](https://phpackages.com/packages/ajurgensen-php-magic)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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