PHPackages                             atelfoto/template-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. atelfoto/template-admin

ActiveCakephp-plugin[Admin Panels](/categories/admin)

atelfoto/template-admin
=======================

Admin plugin for CakePHP

1.0.6(5y ago)19MITJavaScriptCI failing

Since Aug 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/atelfoto/template-admin)[ Packagist](https://packagist.org/packages/atelfoto/template-admin)[ RSS](/packages/atelfoto-template-admin/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (2)Versions (8)Used By (0)

Admin plugin for CakePHP
========================

[](#admin-plugin-for-cakephp)

Installation
------------

[](#installation)

You can install this plugin into your CakePHP application using [composer](https://getcomposer.org).

The recommended way to install composer packages is:

```
composer require --dev atelfoto/template-admin
```

### Enable Plugin

[](#enable-plugin)

```
// src/Application.php

public function bootstrap()
{
    $this->addPlugin('Admin');
}
```

Or Execute the following line in your shell command bash!

```
bin/cake plugin load Admin

```

### Enable prefix admin

[](#enable-prefix-admin)

```
//config/routes

Router::prefix('admin', function ($routes)
{
    $routes->connect('/', ['controller' => 'Dashboards', 'action' => 'index']);
    $routes->fallbacks(DashedRoute::class);
});
```

### Enable Theme and Layout

[](#enable-theme-and-layout)

```
// src/controller/AppController.php

public function beforeFilter(Event $event)
    {
        if (!is_null($this->request->getParam('prefix'))) {
            $prefix = explode('/', $this->request->getParam('prefix'))[0];

            switch ($prefix) {
                case 'admin':
                    $this->viewBuilder()->setLayout('admin');
                    $this->viewBuilder()->setTheme('Admin');
                    break;
            }
        }
    }
```

### Enable View

[](#enable-view)

```
// src/View/AppView.php

public function initialize()
    {
        $this->loadHelper('Form', [
            'templates' => 'Admin.form-template',
        ]);
    }
```

### Configure

[](#configure)

add this line

```
// config/bootstrap.php

Configure::load('Admin.config-dist', 'default', false);

```

below this line

```
Configure::load('app', 'default', false);

```

### Bake

[](#bake)

#### Migrate Tables

[](#migrate-tables)

```
bin/cake migrations migrate -p Admin
bin/cake migrations seed -p Admin
```

Or for each seed

```
bin/cake migrations seed --seed UsersSeed -p Admin
bin/cake migrations seed --seed HelpsSeed -p Admin
bin/cake migrations seed --seed MenusSeed -p Admin

```

Copy this Model

```
cp -R vendor/atelfoto/template-admin/src/Model/* src/Model/
```

And this Controller

```
cp -r vendor/atelfoto/template-admin/src/Controller/Admin/* src/Controller/Admin/
```

### Models

[](#models)

#### model examples

[](#model-examples)

```
bin/cake bake model examples
```

### Controllers

[](#controllers)

#### Controller Examples

[](#controller-examples)

```
// ex. Examples for actions and prefix admin (with fields name:string and online:boolean ).

bin/cake bake controller Examples --actions index,view,add,edit,delete,deleteAll,online, --prefix admin -t Admin
```

For a Table with behavior Tree add moveUp and moveUp in --actions

```
bin/cake bake controller Examples --actions index,view,add,edit,delete,deleteAll,moveUp,moveDown,online, --prefix admin -t Admin

```

In controller/Admin/ExamplesController.php in the actions Add and edit change this line

```
$parentMenus = $this->Examples->ParentMenus->find('list', ['limit' => 200]);
```

for this

```
$parentMenus = $this->Menus->ParentMenus->find(
            'treeList',
            [
                'spacer' => "---- ",
            ]
        );
```

Templates
---------

[](#templates)

#### Template Examples

[](#template-examples)

```
bin/cake bake template Examples --prefix admin -t Admin

```

For Table with behavior Tree delete this lines.

```
//template/Admin/Examples/add.ctp
//and
//template/Admin/examples/edit.ctp
echo $this->Form->control('controller');
echo $this->Form->control('online');
```

and this line

```
//Template/Admin/Menus/index.ctp

```

Behavior Sluggable
------------------

[](#behavior-sluggable)

In a Table and the function initialize add this line.

```
$this->addBehavior('Admin.Sluggable');
```

---

[![Page menus](docs/menus.jpg)](docs/menus.jpg)

[![Page menus](docs/add.jpg)](docs/add.jpg)

[![Page menus](docs/mobile.jpg)](docs/mobile.jpg)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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.

###  Release Activity

Cadence

Every ~2 days

Total

6

Last Release

2100d ago

### Community

Maintainers

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

---

Top Contributors

[![atelfoto](https://avatars.githubusercontent.com/u/5081451?v=4)](https://github.com/atelfoto "atelfoto (18 commits)")

---

Tags

cakephptheme

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/atelfoto-template-admin/health.svg)

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

###  Alternatives

[friendsofcake/crud

CakePHP Application development on steroids - rapid prototyping / scaffolding &amp; production ready code - XML / JSON APIs and more

3751.4M25](/packages/friendsofcake-crud)[dereuromark/cakephp-setup

A CakePHP plugin containing lots of useful management tools

36162.8k2](/packages/dereuromark-cakephp-setup)[friendsofcake/crud-view

View layer for CRUD

52433.8k2](/packages/friendsofcake-crud-view)[arodu/cakelte

CakeLTE: AdminLTE plugin for CakePHP

3626.9k](/packages/arodu-cakelte)[dereuromark/cakephp-translate

A CakePHP plugin for managing translations

1710.4k](/packages/dereuromark-cakephp-translate)[xety/xeta

A resource to help people starting with Cake3

531.4k](/packages/xety-xeta)

PHPackages © 2026

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