{"id":14974511,"url":"https://github.com/lancewan/any","last_synced_at":"2025-10-27T09:30:40.362Z","repository":{"id":140686376,"uuid":"98138518","full_name":"lanceWan/any","owner":"lanceWan","description":"Any-基于Laravel5.5新的权限管理后台骨架","archived":false,"fork":false,"pushed_at":"2017-12-18T10:07:54.000Z","size":5143,"stargazers_count":114,"open_issues_count":4,"forks_count":28,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-02-01T04:31:45.688Z","etag":null,"topics":["admin-dashboard","laravel","laravel54","php"],"latest_commit_sha":null,"homepage":"http://any.iwanli.me","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lanceWan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-07-24T01:52:15.000Z","updated_at":"2024-05-28T13:03:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"d62b7b1d-0df4-43c0-8c12-abeae4e5bf52","html_url":"https://github.com/lanceWan/any","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/lanceWan%2Fany","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanceWan%2Fany/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanceWan%2Fany/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lanceWan%2Fany/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lanceWan","download_url":"https://codeload.github.com/lanceWan/any/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238471965,"owners_count":19478138,"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":["admin-dashboard","laravel","laravel54","php"],"created_at":"2024-09-24T13:50:40.093Z","updated_at":"2025-10-27T09:30:36.928Z","avatar_url":"https://github.com/lanceWan.png","language":"PHP","readme":"# Any\n最简化权限管理系统，基于 Laravel5.5 开发。Laravel5.4 版本请切换到 `any54` 分支。\n\n## Any 是什么\n`Any` 是一个最简化全新管理后台模块，包含最简单的权限控制。最开始写权限系统的时候是看的一个老外写的源码。根据他的代码自己写了一个 基于Laravel5.2 `IAdmin` 后台，这个是最开始权限系系统，为了公用，所有权限都是写的配置文件。\n\n`iDashboard` 是在 `IAdmin` 的基础之上优化了设计思想和代码结构，并且权限和路由名称进行绑定，一个中间件就可以判断所有控制器的权限。基于 Laravel5.3 开发，唯一优化的是用权限和路由别名绑定，这样代码写好之后就可以直接使用。但配置文件配置过多问题还是没有解决。\n\n`Any` 是在 `iDashboard` 经验上重构的一个项目，之前版本的权限控制都是需要自己去定义，有没有一种方式像 ACL 那样自动生成权限并判断？这样就大大减少了去定义权限和配置。 `Any` 由此诞生。\n\n`Any` 的主要原理就是根据用户访问的路由，获取当前访问的控制器(controller)和方法(method)，控制器加方法生成唯一权限值，当一个用户访问某个方法的时候中间件会判断。如果是超级管理员，即使没有这个权限会自动赋予权限给超级管理员角色。为了避免中间件查询过多，所以在用户登录的成功之后会缓存一份当前用户的所有权限，判断权限的时候直接获取缓存中，更新任何角色的权限都会更新缓存。除此之外，代码上也进行了很多优化。\n\n## Any 特点\n- 基于控制器方法权限控制\n- 多主题(目前只开发了一套，后期支持)\n- 多语言(没有实现数据多语言化)\n\n\u003e 这些只是基础功能的开始，希望得到更多的灵感\n\n## 安装 Any\n下载本项目代码到本地：\n```\ngit clone https://github.com/lanceWan/any.git\n```\n\n进入到项目然后 `composer` 安装：\n\n```\ncd any\n\ncomposer install\n```\n\n配置 `.env` 文件：\n```\n[sudo]cp .env.example .env\n```\n\n\u003e Linux 和 Mac 下注意执行权限 !\n\n配置数据库：\n```\nDB_HOST=localhost\nDB_DATABASE=homestead\nDB_USERNAME=homestead\nDB_PASSWORD=secret\n```\n\n迁移数据：\n```\nphp artisan migrate --seed\n```\n\nOK,项目已经配置完成，直接访问首页然后登录即可，不清楚路由的可以直接去看 `routes/web.php` 文件。默认管理员账号：`iwanli` , 密码：`123456` 。如果你是在 `Linux` 或 `Mac` 下配置的请注意相关目录的权限，这里我就不多说了，enjoy！\n\n\n## 建议和反馈\n`Any` 发展离不开大家的反馈和建议，如果大家有什么想法可以直接在 [https://github.com/lanceWan/any/issues](https://github.com/lanceWan/any/issues) 中提出，谢谢。\n\nLaravel学习交流群：`312621686`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flancewan%2Fany","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flancewan%2Fany","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flancewan%2Fany/lists"}