42sol/onlyoffice-laravel
Composer 安装命令:
composer require 42sol/onlyoffice-laravel
包简介
Connector for Laravel for easy Onlyoffcie integration
README 文档
README
Connector between larvel framework and onlyoffcie self-hosted api
Configuration
After installation run
php artisan vendor:publish --tag=onlyoffice-default
Set "host" variable with the address of your only office installation in published configuration file Provide JWT_SECRET generated by your installation of onlyoffice via env variable (assuming one been generated/set during onlyoffice installation).
Development notes
Container configuration
For usage with docker add to your docker-compose file:
documentserver:
image: onlyoffice/documentserver
environment:
- ALLOW_PRIVATE_IP_ADDRESS=true
- USE_UNAUTHORIZED_STORAGE=true
- JWT_ENABLED=false
- JWT_HEADER=Authorization
- JWT_SECRET=${JWT_SECRET}
Usage of traefic advised due to complications with traffic routing between containers. Add following to previously mentioned container configuration, update your hosts.etc file with nessesery hosts
labels:
- "traefik.enable=true"
- "traefik.http.routers.$COMPOSE_PROJECT_NAME-office.rule=Host(`*addition to base domain name*.$DOMAIN_NAME`)"
extra_hosts:
- "$DOMAIN_NAME=host-gateway"
- "host.docker.internal=host-gateway"
It is better to set JWT_SECRET via env variable or directly in environment section before running containers. Otherwise it will be generated automatically and will be difficult to obtain.
Also don't forget to add new host (*addition to base domain name*.$DOMAIN_NAME) to extra_hosts section of your php container configuration.
Filesystem configuration
If files you want to open aren't in storage/public forlder then you will have to configure additional symlink and disk in filesystems.php Make shure symlink and 'url' parameter from disk config are leading on the same path.
'files' => [
'driver' => 'local',
'root' => storage_path('app/files'),
'url' => env('APP_URL').'/storage/files',
],
// ...
'links' => [
//...
public_path('storage/files') => storage_path('app/files')
],
42sol/onlyoffice-laravel 适用场景与选型建议
42sol/onlyoffice-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 40 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 03 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 42sol/onlyoffice-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 42sol/onlyoffice-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 40
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-14