PHPackages                             locky42/leopard-admin - 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. [Admin Panels](/categories/admin)
4. /
5. locky42/leopard-admin

ActiveLibrary[Admin Panels](/categories/admin)

locky42/leopard-admin
=====================

A library for managing the administration panel of a web application.

1.0.3(5mo ago)010MITPHP

Since Mar 17Pushed 5mo agoCompare

[ Source](https://github.com/locky42/leopard-admin)[ Packagist](https://packagist.org/packages/locky42/leopard-admin)[ RSS](/packages/locky42-leopard-admin/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (4)Dependencies (5)Versions (4)Used By (0)

Leopard Admin Module
====================

[](#leopard-admin-module)

`locky42/leopard-admin` provides admin-domain models, mappings, and controllers on top of `leopard-user`.

Features
--------

[](#features)

- Base admin models:
    - `Leopard\Admin\Models\BaseAdminUser`
    - `Leopard\Admin\Models\BaseAdminRole`
    - `Leopard\Admin\Models\BaseAdminPermission`
- Contract-based model mapping for admin entities
- Doctrine bootstrap integration (`ResolveTargetEntity` + model path registration)
- Admin controllers and templates for admin panel flows

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

[](#requirements)

- PHP `^8.3`
- `doctrine/orm ^3`
- `locky42/leopard-user`
- `locky42/leopard-events`

Contracts
---------

[](#contracts)

- `Leopard\Admin\Contracts\Models\AdminUserInterface`
- `Leopard\Admin\Contracts\Models\AdminRoleInterface`
- `Leopard\Admin\Contracts\Models\AdminPermissionInterface`

Doctrine Integration
--------------------

[](#doctrine-integration)

Package bootstrap (`packages/leopard-admin/bootstrap.php`) does two things:

1. Registers resolve-target mappings before EntityManager metadata resolution:
    - `AdminUserInterface -> BaseAdminUser`
    - `AdminRoleInterface -> BaseAdminRole`
    - `AdminPermissionInterface -> BaseAdminPermission`
2. Adds admin model paths to the current metadata driver via `addPaths([__DIR__ . '/src/Models'])`.

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

[](#quick-start)

In application projects, map admin contracts to your app entities (or keep defaults).

```
use Leopard\Core\Factory\ContractFactory;
use Leopard\Admin\Contracts\Models\AdminUserInterface;
use Leopard\Admin\Contracts\Models\AdminRoleInterface;
use Leopard\Admin\Contracts\Models\AdminPermissionInterface;
use App\Models\Admin\AdminUser;
use App\Models\Admin\AdminRole;
use App\Models\Admin\AdminPermission;

ContractFactory::register(AdminUserInterface::class, AdminUser::class);
ContractFactory::register(AdminRoleInterface::class, AdminRole::class);
ContractFactory::register(AdminPermissionInterface::class, AdminPermission::class);
```

`ContractFactory::register(...)` also synchronizes resolve-target mappings when `leopard-doctrine` is available.

Controllers
-----------

[](#controllers)

Main controller:

- `Leopard\Admin\Controllers\AdminController`

The controller uses `AuthenticationService` + `AuthorizationService` and resolves concrete model classes through `ResolveTargetEntityRegistry`.

Routing Requirements
--------------------

[](#routing-requirements)

For admin module UI to work, your app must provide routes for these controllers:

- `\Leopard\Admin\Controllers\AdminController`
- `\Leopard\Admin\Controllers\AdminAssetsController`

You can choose one of these integration strategies:

1. Register routes directly to these package controllers.
2. Create your own controllers that extend these classes and route to your subclasses.
3. Implement equivalent controllers in your app with the required functionality.

If routes for admin pages/assets are missing, admin panel screens and static asset endpoints will not be reachable.

Testing
-------

[](#testing)

From repository root:

```
vendor/bin/phpunit --testsuite=leopard-admin
```

or

```
composer test:admin
```

License
-------

[](#license)

MIT

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance73

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

151d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/57048956?v=4)[Max](/maintainers/locky42)[@locky42](https://github.com/locky42)

---

Top Contributors

[![locky42](https://avatars.githubusercontent.com/u/57048956?v=4)](https://github.com/locky42 "locky42 (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/locky42-leopard-admin/health.svg)

```
[![Health](https://phpackages.com/badges/locky42-leopard-admin/health.svg)](https://phpackages.com/packages/locky42-leopard-admin)
```

###  Alternatives

[jeroennoten/laravel-adminlte

Easy AdminLTE integration with Laravel

4.0k5.2M44](/packages/jeroennoten-laravel-adminlte)[dmstr/yii2-adminlte-asset

AdminLTE backend theme asset bundle for Yii 2.0 Framework

1.1k1.9M67](/packages/dmstr-yii2-adminlte-asset)[hail812/yii2-adminlte3

adminlte3 for yii2

79271.6k2](/packages/hail812-yii2-adminlte3)[eveseat/web

SeAT Web Interface

2623.6k166](/packages/eveseat-web)[arodu/cakelte

CakeLTE: AdminLTE plugin for CakePHP

3532.0k](/packages/arodu-cakelte)

PHPackages © 2026

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