Download the PHP package lartrix/thinkrix without Composer

On this page you can find all versions of the php package lartrix/thinkrix. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package thinkrix

Lartrix Think (Thinkrix)

ThinkPHP 8 后台管理包,为 Trix 前端提供完整 API 接口

Thinkrix 是 Lartrix(Laravel 版)的 ThinkPHP 移植版,两者功能同步。前端统一使用 Trix(Vue 3 + NaiveUI + vschema-ui),后端生态共享。

模块生态协议

当前版本包含破坏性升级,旧 Registry 配置名和旧的独立 manifest 约定不再兼容:

项目安装先解析 Registry 安装计划并生成 config/trix-project.php;加上 --execute 后,才会依次下载、校验、暂存、复核并复制缺失模块:

安全边界是强制的:市场 HTTP 请求不跟随重定向;包下载地址必须与 module_market.url 的 scheme、host、port 同源;暂存、复制和更新替换前都会递归拒绝符号链接。Zip 预检还会拒绝目录穿越、绝对路径和 Windows 盘符路径,安装链路不会自动执行包内脚本。

模块接口按职责拆分:ModuleController 仅管理本地已安装模块及 Logo;ModuleMarketController 负责市场列表和模块/项目安装;ModulePublishController 负责模块与项目发布。宿主项目需要替换控制器时,应分别配置 controllers.module、controllers.module_market 和 controllers.module_publish。

完整说明见 模块开发与生态。


功能特性


安装

环境要求

步骤

安装命令会自动执行迁移或兜底建表,并创建超级管理员角色、权限、默认菜单和系统设置。


配置

安装后配置文件位于 config/thinkrix.php,支持环境变量覆盖:

配置键 环境变量 默认值 说明
path THINKRIX_PATH /admin 前端入口路径
api_prefix THINKRIX_API_PREFIX api/admin API 路由前缀
guard THINKRIX_GUARD admin 当前 guard 名称
theme.appTitle THINKRIX_APP_TITLE Thinkrix Admin 系统标题
logo THINKRIX_LOGO /admin/favicon.svg 系统 Logo
super_admin_role THINKRIX_SUPER_ADMIN_ROLE super-admin 超级管理员角色
realtime.driver THINKRIX_REALTIME_DRIVER polling 实时消息模式(polling/ws)
realtime.polling.interval THINKRIX_REALTIME_POLLING_INTERVAL 15000 轮询间隔(毫秒)
header.global_search THINKRIX_HEADER_GLOBAL_SEARCH true 显示全局搜索
header.notification THINKRIX_HEADER_NOTIFICATION true 显示通知中心
header.lang_switch THINKRIX_HEADER_LANG_SWITCH true 显示语言切换

完整配置项参见 config/thinkrix.php。


增加语言

语言种类由 Thinkrix 后端配置提供,不需要修改或重新编译 Trix 前端。例如增加日语:

然后创建项目语言文件 config/lang/ja-jp.php。它可以同时包含后端 Schema 文案和 Trix 界面翻译;项目语言会覆盖包内同名键。切换语言后,前端会从 /translations 动态加载语言包并缓存,无需增加前端语言模块。

naive_locale 控制 Naive UI 日期、分页等内置文案的基础语言,目前支持 zh-CN 和 en-US;其他语言可以先选择其中一个作为回退。


命令参考

命令 说明
php think thinkrix:install 全新安装(建表+初始化数据)
php think thinkrix:publish 发布前端静态资源
php think thinkrix:make-backend 创建二级后台模块
php think thinkrix:remove-backend 删除二级后台模块
php think thinkrix:module-list 列出已安装模块
php think thinkrix:module-make 创建新模块
php think thinkrix:module-enable 启用模块
php think thinkrix:module-disable 禁用模块
php think thinkrix:module-delete 删除模块
php think thinkrix:module-publish-config 发布模块配置到项目

导航栏自定义

支持两种方式在右上角添加自定义按钮:

1. 简单图标按钮(配置即可)

2. 高级自定义(通过 schema API 返回任意 UI)

schema_api 接口返回 vschema-ui JSON 节点,支持 NaiveUI 所有组件(Popover、Dropdown、Switch 等)。


实时消息配置

启用后前端每 interval 毫秒调用 /notifications/poll?since_id=X 拉取增量消息。 开发者可继承 RealtimeService 重写 getNewMessages() / getUnreadCount() 实现自定义逻辑。


Schema Builder

通过 PHP 代码构建 JSON Schema,由前端 vschema-ui 渲染为 NaiveUI 组件。

示例:CRUD 页面

支持组件:120+ NaiveUI 组件封装 + 自定义业务组件(CrudPage、OptForm、DataTable 等)。


文件结构


与 Laravel 版的差异

Thinkrix 与 Lartrix(Laravel 版)功能同步,主要差异:

方面 Lartrix (Laravel) Thinkrix (ThinkPHP)
框架 Laravel 10/11/12 ThinkPHP 8
Excel 导出 maatwebsite/excel PhpSpreadsheet(自带封装)
权限包 Spatie Permission 自定义 RBAC
Token Laravel Sanctum 自定义 Bearer Token
多态关联 Eloquent morphToMany BelongsToMany + wherePivot
配置发布 php artisan vendor:publish php think thinkrix:publish

License

MIT


All versions of thinkrix with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
topthink/framework Version ^8.0
topthink/think-migration Version ^3.1
topthink/think-orm Version ^3.0|^4.0
phpoffice/phpspreadsheet Version ^2.0|^3.0
wikimedia/composer-merge-plugin Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lartrix/thinkrix contains the following files

Loading the files please wait ...