Implementasi sederhana Laravel 13 dengan ONLYOFFICE untuk fitur edit dokumen langsung di browser.
- Laravel berjalan di:
http://127.0.0.1:7635 - ONLYOFFICE berjalan di Docker:
http://localhost:7771 - Lokasi penyimpanan dokumen:
storage/app/onlyoffice - Format yang didukung: docx, xlsx, pptx
Requirement
- PHP 8.3+
- Composer
- Docker Desktop
Environment Configuration
APP_URL=http://127.0.0.1:7635
APP_PUBLIC_URL=http://127.0.0.1:7635
APP_INTERNAL_URL=http://host.docker.internal:7635
ONLYOFFICE_URL=http://localhost:7771
ONLYOFFICE_JWT_ENABLED=true
ONLYOFFICE_JWT_SECRET=local-onlyoffice-secret
Menjalankan Aplikasi
1. Install dependency
composer install2. Jalankan Laravel
php artisan serve --host=0.0.0.0 --port=76353. Jalankan ONLYOFFICE
docker compose up -d4. Akses aplikasi
http://127.0.0.1:7635Catatan
- Callback ONLYOFFICE masuk ke Laravel melalui
APP_INTERNAL_URL - Jika editor gagal load akibat IDM, exclude:
127.0.0.1:7635localhost:7771