keysoft / dokumentat
Package for using ONLYOFFICE DEVELOPER EDITION for documents
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.8
- pestphp/pest: ^2.20
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
This package is auto-updated.
Last update: 2025-05-09 01:24:03 UTC
README
ONLYOFFICE DEVELOPER EDITION Package for Laravel with Vue 3 Integration
Overview
This Laravel package enables the integration of ONLYOFFICE DEVELOPER EDITION with Vue 3 applications. It includes controllers, models, and jobs to facilitate the connection with the ONLYOFFICE editor, allowing functionalities like document conversion to PDF among others. The package also includes example files demonstrating best practices and effective usage of ONLYOFFICE within a Laravel environment.
Key Dependencies:
- Laravel Inertia -> Required,
- Laravel-Medialibrary -> Recommended for enhanced file management,
- Laravel Breeze - Simplifies the installation of Inertia, Tailwind, and Vue
- Tailwind -> For styling
- Vue -> Core dependency
Prerequisites
=== Ensure Laravel Breeze with Inertia.Vue is installed before using this package ===
Installation
You can install the package via composer:
composer require keysoft/dokumentat
You can publish and run the migrations with:
php artisan vendor:publish --tag="dokumentat-migrations"
php artisan migrate
Configuration Notes:
- The config file sets the local environment IP and handles callbacks for document conversions using ONLYOFFICE's asynchronous approach.
- Example configurations for local and production environments are provided below.
php artisan vendor:publish --tag="dokumentat-config"
This is the contents of the published config file:
- Local Environment Config:
return [ 'developer' => 'http://192.168.0.3:82/"', 'convert' => config('dokumentat.developer').'/ConvertService.ashx', ];
- Production Environment Config:
return [ 'developer' => 'https://yourdomain.com/"', 'convert' => config('dokumentat.developer').'/ConvertService.ashx', ];
Usage
After installing Breeze (or Inertia separately) and this package, use the following command to set up the necessary files:
php artisan dokumentat
This command will create a model, controller, a job, add routes, and a Vue document. It will also install the necessary npm packages.
Upcoming Features:
- Guidelines for setting up a local environment with ONLYOFFICE.
- Integration examples with PHPWord and PHPExcel.
Further details and use cases will be added soon, including setting up ONLYOFFICE locally and on a server, and integrating it with other applications.
Tutorials:
- Part 1 / ['Examples/Part1']
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.