{"id":17955830,"url":"https://github.com/limingxinleo/phalcon-rbac","last_synced_at":"2025-03-25T02:31:03.395Z","repository":{"id":114881748,"uuid":"80101208","full_name":"limingxinleo/phalcon-rbac","owner":"limingxinleo","description":"rbac 权限管理项目","archived":false,"fork":false,"pushed_at":"2017-04-10T13:19:10.000Z","size":873,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T06:49:21.820Z","etag":null,"topics":["phalcon","php","rbac"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/limingxinleo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-26T09:33:59.000Z","updated_at":"2020-12-29T01:13:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"81b586de-185c-4683-9442-99c3df333cc6","html_url":"https://github.com/limingxinleo/phalcon-rbac","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limingxinleo%2Fphalcon-rbac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limingxinleo%2Fphalcon-rbac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limingxinleo%2Fphalcon-rbac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limingxinleo%2Fphalcon-rbac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/limingxinleo","download_url":"https://codeload.github.com/limingxinleo/phalcon-rbac/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245385315,"owners_count":20606647,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["phalcon","php","rbac"],"created_at":"2024-10-29T10:32:27.260Z","updated_at":"2025-03-25T02:31:03.386Z","avatar_url":"https://github.com/limingxinleo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RBAC 权限管理系统\n## 安装方法\n~~~\ngit clone https://github.com/limingxinleo/phalcon-rbac.git\ncd phalcon-rbac\ncp .env.example .env\n~~~\n* 修改.env中的 DB配置\n* 修改 app/config/config.ini 中的DB配置\n* 安装phalcon脚本工具\n* 执行以下代码\n~~~\nphalcon migration generate\n~~~\n## 注意事项\n* 如果没有phalcon.so扩展和phalcon命令 请到[Phalcon 文档](https://docs.phalconphp.com/zh/latest/index.html)查看如果安装扩展\n\n\n# phalcon-project\n[![Total Downloads](https://poser.pugx.org/limingxinleo/phalcon-project/downloads)](https://packagist.org/packages/limingxinleo/phalcon-project)\n[![Latest Stable Version](https://poser.pugx.org/limingxinleo/phalcon-project/v/stable)](https://packagist.org/packages/limingxinleo/phalcon-project)\n[![Latest Unstable Version](https://poser.pugx.org/limingxinleo/phalcon-project/v/unstable)](https://packagist.org/packages/limingxinleo/phalcon-project)\n[![License](https://poser.pugx.org/limingxinleo/phalcon-project/license)](https://packagist.org/packages/limingxinleo/phalcon-project)\n\n\n[Phalcon 官网](https://docs.phalconphp.com/zh/latest/index.html)\n\n## 安装方法 ##\n~~~\ngit clone --depth=1 git://github.com/phalcon/cphalcon.git\ncd cphalcon/build\nsudo ./install\n\nvim etc/php.ini \nextension=phalcon.so\n\ncomposer create-project limingxinleo/phalcon-project demo\n~~~\n\n## 目录结构\n\n初始的目录结构如下：\n\n~~~\nwww  WEB部署目录（或者子目录）\n├─app                   项目文件\n│ ├─config              配置文件\n│ ├─controllers         控制器目录\n│ ├─library             第三方库目录\n│ ├─models              模型目录\n│ ├─services            自定义服务目录\n│ ├─tasks               任务目录\n│ ├─traits              Trait目录\n│ └─views               视图目录\n├─public                资源目录\n│ ├─app                 项目资源目录\n│ ├─lib                 第三方资源目录\n│ ├─.htaccess           apache重写文件\n│ └─index.php           入口文件\n├─storage               项目写入仓库\n│ ├─cache               项目缓存目录\n│ │ ├─data              数据缓存目录\n│ │ └─view              视图缓存目录\n│ ├─log                 日志目录\n│ ├─meta                模型元数据目录\n│ └─migrations          数据库迁移目录\n├─tests                 单元测试目录\n├─vendor                第三方类库目录（Composer依赖库）\n├─.env                  env支持配置文件\n├─composer.json         composer定义文件\n├─README.md             README文件\n├─LICENSE               授权说明文件\n├─run                   命令行入口文件\n~~~\n## 定时脚本 ##\n* crontab -e \n* 编辑增加 * * * * * /path/to/php /path/to/run System\\\\\\\\Cron \u003e\u003e /dev/null 2\u003e\u00261\n* 启动crond 服务\n* 在config/app.php 中维护cron-tasks数组\n\n## 注意事项 ##\n* 利用phalcon脚本新建model时，使用phalcon model name --namespace=MyApp\\Models\n* 利用phalcon脚本新建controller时，使用phalcon controller name --namespace=MyApp\\Controllers\\SubNamespace\n\n* 使用模型进行信息存储时，因为模型元数据的问题，非空字段会匹配非空、非空字符串两个条件，致使一些空字符串字段不赋默认非空字符串值的情况下，保存失败！\n* 框架默认以文件的方式缓存元数据，一旦表结构被修改，请执行php run system\\clear meta yes 清理元数据\n* 在使用Model的Relation时，因为命名空间的问题，需要使用别名，例如 $this-\u003ehasMany(\"id\", \"MyApp\\\\Models\\\\Book\", \"uid\", ['alias' =\u003e 'book']);\n* 控制器中 $this-\u003erequest-\u003eurl函数 (url助手函数) 生成的地址 会拼接config中的baseUri。\n* 控制器中 $this-\u003eresponse-\u003eredirect() 会根据当前模块跳转。\n* 默认的调度params是按照数组顺序进行对应的。\n* 使用Cli时，因为Windows对大小写不敏感 可以用php run system\\clear 但在Linux下 需要使用php run System\\\\\\\\Clear\n* 使用Phalcon 开发工具的时候，需要维护config/config.ini配置文件\n* 初始化脚本因为Windows和Linux使用Cli的区别，没办法同时兼容，暂时兼容Windows，Linux需要手动执行命令。\n* 项目没有设置时区，所以对于8小时的误差，要么在项目中增加date_default_timezone_set(Asia/Shanghai)，要么在php.ini中修改date.timezone = Asia/Shanghai\n* 使用dispatch forward调度的时候，必须使用return截断控制器。要不然他会走后面的dispatch forward调度。如果使用exit截断，调度则不会执行。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimingxinleo%2Fphalcon-rbac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flimingxinleo%2Fphalcon-rbac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimingxinleo%2Fphalcon-rbac/lists"}