amostajo/perfex-crm
Composer 安装命令:
composer require amostajo/perfex-crm
包简介
Perfex CRM library to customize hooks.
README 文档
README
This repository shows how to customize Perfex CRM back-end and front-end.
NOTE: The CRM codebase is NOT IN here.
Customizations
Back-end
Back-end customizations can be done using Perfex CRM hooks, which is an event-driven customization system similar to the one created by WordPress.
Inside the /perfexcrm folder, this project has a replica of the my_functions_helper.php file with custom hooks created.
SIDE NOTE: My approach to back-end customizations implements dependency injection and ORM to avoid direct database queries and to make the code more maintainable.
use Amostajo\PerfexCRM\Samples\ClientHooks; // Bootstrap composer require '../vendor/autoload.php'; // Register hooks ClientHooks::register();
In your project
You can reuse the base Hook class in your project, by installing this package:
composer require amostajo/perfex-crm
Your hook registation class:
use Amostajo\PerfexCRM\Hook; use Amostajo\PerfexCRM\Traits\Registerable; class MyHooks extends Hook { use Registerable; public function init() { hooks()->add_action('hook_name', [$this, 'callback_method']); } public function callback_method($args) { // Your code here } }
Then in your my_functions_helper.php file, you can register your hooks:
// Bootstrap composer require __DIR__ . '/../vendor/autoload.php'; MyHooks::register();
Test
First, you will need to install composer dependencies:
composer install
You can review the hook registration and test with PHPUnit.
./vendor/bin/phpunit
Front-end
Front-end can be customized through a custom Perfex CRM theme or custom CSS.
Custom CSS
In this project, we have a custom CSS file that changes the background color of the CRM.
Inside the /perfexcrm folder, there is a custom.css file that is loaded in the CRM (real file is assets/css/custom.css).
The source file is located at assets/scss/custom.scss, which is compiled to perfexcrm/custom.css.
SIDE NOTE My approach to front-end implements vite to bundle the SCSS file and make it easier to maintain.
Compile
First, you will need to install npm dependencies:
npm install
Finally compile:
npm run build
Custom theme
Custom theming requires template replication. Ideally we want to bundle our related assets using Vite or Webpack.
Conclusion
This repository shows how to customize Perfex CRM back-end and front-end using hooks and custom CSS. The back-end customizations are done using an event-driven system, while the front-end customizations are done through a custom CSS file. This approach allows for maintainable and scalable customizations without modifying the core codebase of Perfex CRM.
Since this CRM was design mimicing WordPress customization engine, it is a great choice for WordPress developers.
amostajo/perfex-crm 适用场景与选型建议
amostajo/perfex-crm 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 amostajo/perfex-crm 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 amostajo/perfex-crm 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-11