PHPackages                             nordsoftware/lumen-contentful - 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. nordsoftware/lumen-contentful

AbandonedArchivedLibrary[API Development](/categories/api)

nordsoftware/lumen-contentful
=============================

A Lumen service provider for Contentful

4.2.0(5y ago)139.0k11MITPHPPHP &gt;= 7.0

Since Apr 19Pushed 3y ago6 watchersCompare

[ Source](https://github.com/digiaonline/lumen-contentful)[ Packagist](https://packagist.org/packages/nordsoftware/lumen-contentful)[ RSS](/packages/nordsoftware-lumen-contentful/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (14)Used By (1)

lumen-contentful
================

[](#lumen-contentful)

[![Test](https://github.com/digiaonline/lumen-contentful/actions/workflows/test.yml/badge.svg)](https://github.com/digiaonline/lumen-contentful/actions/workflows/test.yml)[![Latest Stable Version](https://camo.githubusercontent.com/5160a45d817ce9ee92b15a7c31ebb608970c5c66e24d9528c461a721fd85fe27/68747470733a2f2f706f7365722e707567782e6f72672f6e6f7264736f6674776172652f6c756d656e2d636f6e74656e7466756c2f762f737461626c65)](https://packagist.org/packages/nordsoftware/lumen-contentful)[![License](https://camo.githubusercontent.com/352c1cbb706ba6ec32e7c2fa7db3ca9977b897b20f83f7a043e7bdf80bc05d1c/68747470733a2f2f706f7365722e707567782e6f72672f6e6f7264736f6674776172652f6c756d656e2d636f6e74656e7466756c2f6c6963656e7365)](https://packagist.org/packages/nordsoftware/lumen-contentful)

This is a basic Lumen service provider for the Contentful PHP SDK. Version 1.x of this library is compatible with version 2.x of the SDK, while version 2.x of this library is compatible with version 3.x of the SDK. Starting from version 4.x the library version follows the SDK version, so version 4.x of this library is compatible with version 4.x of the SDK.

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

[](#requirements)

- PHP &gt;= 7.0
- Lumen 5.x

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

[](#installation)

Install the library:

```
composer require nordsoftware/lumen-contentful
```

Register the service provider:

```
$app->register(Nord\Lumen\Contentful\ContentfulServiceProvider::class);
```

Finally, copy `config/contentful.php` to your application's `config/` directory, then define the environment variables in your `.env` file. Certain more esoteric options cannot be configured through the configuration file, see the Usage section for more information.

Usage
-----

[](#usage)

Inject `Nord\Lumen\Contentful\ContentfulServiceContract` into your classes, then you'll be able to access the Contentful client by using the `getClient()` method:

```
