andersoncorso / cakephp-app
带有登录和访问控制ACL系统的CakePHP项目,准备好开始开发新的应用程序。
1.0
2019-06-06 11:59 UTC
Requires
- php: >=5.6
- andersoncorso/cakephp-plugin-access_manager: dev-master
- andersoncorso/cakephp-plugin_places: dev-master
- cakephp/cakephp: 3.5.*
- cakephp/migrations: ~1.0
- cakephp/plugin-installer: ~1.0
- ivanamat/cakephp3-aclmanager: ^1.2
- josegonzalez/dotenv: 2.*
- maiconpinto/cakephp-adminlte-theme: ^1.0
- mobiledetect/mobiledetectlib: 2.*
Requires (Dev)
- cakephp/bake: ~1.1
- cakephp/cakephp-codesniffer: ^3.0
- cakephp/debug_kit: ~3.2
- psy/psysh: @stable
Suggests
- cakephp/cakephp-codesniffer: Allows to check the code against the coding standards used in CakePHP.
- dereuromark/cakephp-ide-helper: After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan compatibility.
- markstory/asset_compress: An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.
- phpunit/phpunit: Allows automated tests to be run without system-wide install.
This package is auto-updated.
Last update: 2024-09-09 07:27:22 UTC
README
带有登录和访问控制ACL系统的CakePHP项目,准备好开始开发新的项目。
安装
- 通过composer
composer create-project --prefer-dist andersoncorso/cakephp-app your_app_name
或者
- Git克隆/下载
- 提取或克隆仓库后,使用composer安装项目的依赖。
composer install
如有需要,使用以下命令启动内置的CakePHP服务器
bin/cake server -p 8765
启动后,它应该在:https://:8765
中可用。
配置
-
编辑
config/app.php
文件并配置'Datasources'
和任何其他相关配置;
- 为组、角色和用户创建表结构
bin/cake migrations migrate -p AccessManager
- (可选) 包含预定义组和角色的初始内容:组:网络管理员、管理员、用户;角色:网络管理员、管理员、总管理员、用户;用户:webmaster@app.com
bin/cake migrations seed -p AccessManager
- 创建Acl的表结构
bin/cake migrations migrate -p Acl
- 在'./src/Controller/AppController.php'文件中注释或删除以下行:
// $this->Auth->allow();
- 使用用户"webmaster@app.com"和密码"123123"登录;
- 通过访问'.../AclManager'并点击“更新ACOs和AROs并设置默认值”来更新Acl表(acos, aros, aros_acos);
好了!祝你开心 ;)
布局
-
默认情况下,App使用AdminLTE主题,访问官方页面获取更多详情。
-
favicon
- 访问Favicon Generator网站,创建favicon并将其粘贴到目录中
webroot/img/favicon/