PHPackages                             ottosmops/oai-pmh - 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. ottosmops/oai-pmh

ActiveLibrary[API Development](/categories/api)

ottosmops/oai-pmh
=================

Laravel-native OAI-PMH 2.0 server: verb dispatching, resumption tokens, Blade views, pluggable repository contract.

v1.0.0(3mo ago)018MITPHPPHP ^8.2CI passing

Since Apr 21Pushed 3mo agoCompare

[ Source](https://github.com/ottosmops/oai-pmh)[ Packagist](https://packagist.org/packages/ottosmops/oai-pmh)[ RSS](/packages/ottosmops-oai-pmh/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (10)Versions (2)Used By (0)

ottosmops/oai-pmh
=================

[](#ottosmopsoai-pmh)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d1b30eb3e041b0e775fe75f86f9267576c44c203f377804dd3bdceaa609eae8a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f74746f736d6f70732f6f61692d706d682e737667)](https://packagist.org/packages/ottosmops/oai-pmh)[![Tests](https://camo.githubusercontent.com/29ce6aded0fcab5006878b7579c23eab587e0ad7b16e25243e68e578e6e167e5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f74746f736d6f70732f6f61692d706d682f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473)](https://github.com/ottosmops/oai-pmh/actions/workflows/tests.yml)[![Coverage](https://camo.githubusercontent.com/fd66f6a18560d18c7951362a0f678f56ee967f4bb24a2afef45b9618664fad2d/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6f74746f736d6f70732f6f61692d706d683f6c6162656c3d636f766572616765)](https://codecov.io/gh/ottosmops/oai-pmh)[![Total Downloads](https://camo.githubusercontent.com/da1633b6ef697962d2ebe4e303dc1f7f82c823de78ad45167a1bffcd1724ece0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f74746f736d6f70732f6f61692d706d682e737667)](https://packagist.org/packages/ottosmops/oai-pmh)[![License](https://camo.githubusercontent.com/48f38ee2deadbe548b90c1988788aab3366faab306e548dd3ac0febd1ca05240/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6f74746f736d6f70732f6f61692d706d682e737667)](LICENSE.md)[![PHP Version Require](https://camo.githubusercontent.com/9bb60583568797c2e1ddca3a198e01f8110acb1414ae0e3d43ef959896d111b8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6f74746f736d6f70732f6f61692d706d682f706870)](https://packagist.org/packages/ottosmops/oai-pmh)

A Laravel-native OAI-PMH 2.0 server. Ships the protocol framework — verb dispatching, resumption tokens, Blade views, XML envelope — and leaves the domain-specific mapping to your repository implementations.

Implements every requirement of the [OAI-PMH 2.0 specification](https://www.openarchives.org/OAI/openarchivesprotocol.html)including all eight error codes, deleted-record tombstones, set hierarchy, date-granularity rules, and resumption-token pagination with `completeListSize` + `cursor` attributes. XSD-conformance test suite validates every response against the upstream schema.

Originally developed in collaboration with the [Gosteli Archive](https://www.gosteli-archiv.ch) – History of women's movements in Switzerland (University Library Bern; archive database at [gosteli.anton.ch](https://gosteli.anton.ch)), within the [Anton archive management system](https://anton.ch), and later extracted so that other archives can reuse the underlying protocol framework.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10, 11, or 12

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

[](#installation)

```
composer require ottosmops/oai-pmh
```

Publish the config (optional — sensible defaults ship in-package):

```
php artisan vendor:publish --tag=oai-pmh-config
```

Publish the Blade views (optional — only if you need to customise the XML output, e.g. add a custom XSI schema on the root element):

```
php artisan vendor:publish --tag=oai-pmh-views
```

Quickstart
----------

[](#quickstart)

### 1. Implement a repository

[](#1-implement-a-repository)

Repositories fetch records from your data source. The package handles the protocol (pagination, tokens, errors, XML) — you just return records.

```
