julio101290/boilerplate
Composer 安装命令:
composer require julio101290/boilerplate
包简介
CodeIgniter4 Boilerplate based on AdminLTE 3 with user management, roles, permissions, forked of agungsugiarto/boilerplate ...
README 文档
README
CodeIgniter 4 Application Boilerplate
This package for CodeIgniter 4 serves as a basic platform for quickly creating a back-office application. It includes profile creation and management, user management, roles, permissions and a dynamically-generated menu.
Feature
- Configurable backend theme AdminLTE 3
- CSS framework Bootstrap 4
- Icons by Font Awesome 5
- Role-based permissions (RBAC) provided by Myth/Auth
- Dynamically-Generated Menu
- Localized English / Indonesian / Spanish
This project is still early in its development... please feel free to contribute!
The original author is agungsugiarto/boilerplate https://github.com/agungsugiarto/boilerplate, we only made a fork to adapt it to new needs such as translating it into Spanish and making it functional in xampp/lampp
Installation
1. Get The Module
composer require julio101290/boilerplate
2. Set CI_ENVIRONMENT, baseURL, index page, and database config in your .env file based on your existing database (If you don't have a .env file, you can copy first from env file: cp env .env first). If the database does not exist, create the database first.
# .env file CI_ENVIRONMENT = development app.baseURL = 'http://localhost:8080' app.indexPage = '' database.default.hostname = localhost database.default.database = boilerplate database.default.username = root database.default.password = database.default.DBDriver = MySQLi
3. Run publish auth
php spark auth:publish Publish Migration? [y, n]: y created: Database/Migrations/2017-11-20-223112_create_auth_tables.php Remember to run `spark migrate -all` to migrate the database. Publish Models? [y, n]: n Publish Entities? [y, n]: n Publish Controller? [y, n]: n Publish Views? [y, n]: n Publish Filters? [y, n]: n Publish Config file? [y, n]: y created: Config/Auth.php Publish Language file? [y, n]: n
NOTE: Everything about how to configure auth you can find add Myth/Auth.
Is it ready yet? Not so fast!! ;-) After publishing Config/Auth.php you need to change
public $views with these lines below:
public $views = [ 'login' => 'julio101290\boilerplate\Views\Authentication\login', 'register' => 'julio101290\boilerplate\Views\Authentication\register', 'forgot' => 'julio101290\boilerplate\Views\Authentication\forgot', 'reset' => 'julio101290\boilerplate\Views\Authentication\reset', 'emailForgot' => 'julio101290\boilerplate\Views\Authentication\emails\forgot', 'emailActivation' => 'julio101290\boilerplate\Views\Authentication\emails\activation', ];
Open app\Config\Filters.php, find $aliases and add these lines below:
public $aliases = [ 'login' => \Myth\Auth\Filters\LoginFilter::class, 'role' => \julio101290\boilerplate\Filters\RoleFilter::class, 'permission' => \julio101290\boilerplate\Filters\PermissionFilter::class, ];
4. Run publish, migrate and seed boilerplate
php spark boilerplate:install
Open app\Config\validation.php, find $ruleSets and add these lines below:
public $$ruleSets = [ \Myth\Auth\Authentication\Passwords\ValidationRules::class, ];
Open app\entities\Users.php, find $casts and add these lines below:
protected $casts = [ 'username' => 'string', 'email' => 'string', 'firstname' => 'string', 'lastname' => 'string', 'active' => 'boolean', 'force_pass_reset' => 'boolean', ];
5. Run development server:
php spark serve
6. Open in browser http://localhost:8080/admin
Default user and password +----+--------+-------------+ | No | User | Password | +----+--------+-------------+ | 1 | admin | super-admin | | 2 | user | super-user | +----+--------+-------------+
Settings
Config Boilerplate
You can configure default dashboard controller and backend theme in app\Config\Boilerplate.php,
class Boilerplate extends BaseConfig { public $appName = 'Boilerplate'; public $dashboard = [ 'namespace' => 'julio101290\boilerplate\Controllers', 'controller' => 'DashboardController::index', 'filter' => 'permission:back-office', ]; // App/Config/Boilerplate.php
Usage
You can find how it works with the read code routes, controller and views etc. Finnally... Happy Coding!
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Contributions are very welcome.
License
This package is free software distributed under the terms of the MIT license.
julio101290/boilerplate 适用场景与选型建议
julio101290/boilerplate 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 626 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 01 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「authorization」 「Authentication」 「boilerplate」 「codeigniter4」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 julio101290/boilerplate 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 julio101290/boilerplate 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 julio101290/boilerplate 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Automatically logs-in users if they are already authenticated by a remote source. (e.g. environment variable REMOTE_USER)
GraphQL authentication for your headless Craft CMS applications.
Ory-Hydra OAuth 2.0 Client Provider for The PHP League OAuth2-Client
PHP class to extend when building a WordPress plugin allowing you to follow smart plugin setup standards.
A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.
Anax htmlform module.
统计信息
- 总下载量: 626
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 18
- 依赖项目数: 35
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-01-25
