PHPackages                             katalam/laravel-onoffice-adapter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. katalam/laravel-onoffice-adapter

Abandoned → [innobrain/laravel-onoffice-adapter](/?search=innobrain%2Flaravel-onoffice-adapter)Library[API Development](/categories/api)

katalam/laravel-onoffice-adapter
================================

This is my package laravel-onoffice-adapter

v0.13.6(1y ago)51.1k1[1 issues](https://github.com/innobraingmbh/laravel-onoffice-adapter/issues)[1 PRs](https://github.com/innobraingmbh/laravel-onoffice-adapter/pulls)MITPHPPHP ^8.2CI passing

Since May 12Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/innobraingmbh/laravel-onoffice-adapter)[ Packagist](https://packagist.org/packages/katalam/laravel-onoffice-adapter)[ Docs](https://github.com/katalam/laravel-onoffice-adapter)[ GitHub Sponsors](https://github.com/Katalam)[ RSS](/packages/katalam-laravel-onoffice-adapter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (50)Used By (0)

onOffice Adapter for Laravel
============================

[](#onoffice-adapter-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cae1fb61741597fcd44be268ed845db66895e1c75dc3571b59ca8f70e49f775a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e6e6f627261696e2f6c61726176656c2d6f6e6f66666963652d616461707465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/innobrain/laravel-onoffice-adapter)[![GitHub Tests Action Status](https://camo.githubusercontent.com/cfa54cc24b9177236d373354e0cb99c1e431f5e45199fb821388bb8c01bcc59d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696e6e6f627261696e676d62682f6c61726176656c2d6f6e6f66666963652d616461707465722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/innobraingmbh/laravel-onoffice-adapter/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/35077b4865e4a48325506f88aa28ced5a5fe517b0487ae7a728f808f20ccb62c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f696e6e6f627261696e676d62682f6c61726176656c2d6f6e6f66666963652d616461707465722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/innobraingmbh/laravel-onoffice-adapter/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/3d1cd3f36efcd8d08654a02ffcd804a914b89ea24359db1953cbbc28a25f6bf5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e6e6f627261696e2f6c61726176656c2d6f6e6f66666963652d616461707465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/innobrain/laravel-onoffice-adapter)

A fluent query builder for the onOffice API, designed to feel like Eloquent.

**[View Full Documentation](https://oo-adapter.innobra.in/)**

Features
--------

[](#features)

- **ORM-like Querying** - Use familiar Laravel Eloquent-style methods like `where()`, `select()`, `orderBy()`
- **Comprehensive Repositories** - Access estates, addresses, activities, search criteria, files, and more
- **Pagination &amp; Chunking** - Handle large datasets with `each()`, `limit()`, and automatic pagination
- **Middlewares** - Insert custom logic before requests for logging, modification, or validation
- **Testing Support** - Built-in fake system with factories for easy unit testing
- **File Management** - Upload, chunk, and link files with onOffice

Installation
------------

[](#installation)

```
composer require innobrain/laravel-onoffice-adapter
```

Add your onOffice API credentials to `.env`:

```
ON_OFFICE_TOKEN=your-token
ON_OFFICE_SECRET=your-secret

```

For advanced configuration (retry settings, custom headers), publish the config file:

```
php artisan vendor:publish --tag="laravel-onoffice-adapter-config"
```

Usage
-----

[](#usage)

### Basic Queries

[](#basic-queries)

```
use Innobrain\OnOfficeAdapter\Facades\EstateRepository;

// Get all estates
$estates = EstateRepository::query()->get();

// Find by ID
$estate = EstateRepository::query()->find(123);

// Get first result
$estate = EstateRepository::query()->first();

// Count results
$count = EstateRepository::query()->count();
```

### Building Queries

[](#building-queries)

Chain methods to filter, sort, and limit results:

```
$estates = EstateRepository::query()
    ->select(['Id', 'kaufpreis', 'lage'])
    ->where('status', 1)
    ->where('kaufpreis', '
