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

ActiveLibrary[Admin Panels](/categories/admin)

phwoolcon/admin
===============

Admin module for Phwoolcon

014PHP

Since Nov 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/phwoolcon/admin)[ Packagist](https://packagist.org/packages/phwoolcon/admin)[ RSS](/packages/phwoolcon-admin/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Phwoolcon Admin
===============

[](#phwoolcon-admin)

Admin module for Phwoolcon

Features
--------

[](#features)

- Admin User and Roles model
- Admin Login Auth
- Admin ACL (route based)
- Admin operation log

ACL HOWTOs
----------

[](#acl-howtos)

### How/Where to define ACL resources

[](#howwhere-to-define-acl-resources)

The ACl component will scan `admin/*` routes for corresponding controller methods as resources, and looking for `@acl-name` annotation as display name.

To skip ACL check for a whole controller, please set property `$skipAcl` as `true`.

To skip ACL check for a method, please set add a key-value `'methodName' => true,` in property `$skipAclMethod`.

### How to apply ACL

[](#how-to-apply-acl)

ACL SHOULD be applied in the controller method `initialze()`.

1. Use `Phwoolcon\Admin\Auth::getUser()` to get logged in admin user;
2. Process `$skipAcl` and `$skipAclMethod`.
3. Use `Acl::isAllowed($this->user, $controller, $action)` to check if the access is allowed to the user;

```
