PHPackages                             campaigningsoftware/cf-repository-generator - 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. [Database &amp; ORM](/categories/database)
4. /
5. campaigningsoftware/cf-repository-generator

ActiveLibrary[Database &amp; ORM](/categories/database)

campaigningsoftware/cf-repository-generator
===========================================

Generates required repositories, factories and models to access a new Contentful Content Type in Laravel

v12.0.0(4mo ago)01.6k—0%MITPHPPHP ^8.3

Since May 21Pushed 4mo agoCompare

[ Source](https://github.com/CampaigningSoftware/cf-repository-generator)[ Packagist](https://packagist.org/packages/campaigningsoftware/cf-repository-generator)[ RSS](/packages/campaigningsoftware-cf-repository-generator/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (5)Versions (4)Used By (0)

Contentful Repository Generator for Laravel 11
==============================================

[](#contentful-repository-generator-for-laravel-11)

Laravel 11 Contentful Repository generator.

Generates contract, contentful repository, model, factory and caching repository with fields that are defined in the Contentful model. ()

If one of these files does already exist, it can be kept or overwritten.

Usage
-----

[](#usage)

### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require campaigningsoftware/cf-repository-generator

```

#### Supported versions

[](#supported-versions)

Package versionRequired Laravel versionMinimum PHP version^11.011.x^8.1### Step 2: Publish and edit the config file

[](#step-2-publish-and-edit-the-config-file)

```
$ php artisan vendor:publish --provider="CampaigningSoftware\CfRepositoryGenerator\CfRepositoryGeneratorServiceProvider"
```

### Step 3: Create repositories

[](#step-3-create-repositories)

`php artisan make:cf-repository`

This command will load all content types that are defined in the configured contentful space and provide an easy way to generate the relevant classes.

The generated files also contain fake repositories, that can be used instead of the actual contentful data (for instance, if no data is available during development). The whole directory (`FakeData` by default) can be removed, if it isn't used.

Configuration
-------------

[](#configuration)

The published config file `config/cf-repository-generator.php` contains the paths for the generated files inside the `app` directory. To be conform to PSR-4 autoloading, the namespaces of the files are generated out of these paths.

These are the default paths, that will be used, if the config file isn't published, or if the config keys don't exist:

```
return [
    'paths' => [
        'contracts'            => 'Repositories/Contracts/',
        'repositories'         => 'Repositories/',
        'caching-repositories' => 'Repositories/Caching/',
        'models'               => 'Models/',
        'factories'            => 'Factories/',
        'fake-data'            => 'FakeData/',
    ],
];
```

- The `contentful_delivery_space` and `contentful_delivery_token` fields need to be set with the API Key and Space ID retrieved from Contentful.
- By default they are set with the .env variables `CONTENTFUL_DELIVERY_SPACE` and `CONTENTFUL_DELIVERY_TOKEN`.
- `CONTENTFUL_ENVIRONMENT_ID` defines the Contentful environment to use (defaults to `master`)

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance74

Regular maintenance activity

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~261 days

Total

2

Last Release

148d ago

Major Versions

v11.0.0 → v12.0.02026-02-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/28b8a2d7340e21b1a41fa2cc59db3cbf38d8ba2882a2d8fe0d2100fc24915261?d=identicon)[campaigningsoftware](/maintainers/campaigningsoftware)

---

Top Contributors

[![stefanschindler](https://avatars.githubusercontent.com/u/786048?v=4)](https://github.com/stefanschindler "stefanschindler (30 commits)")[![DmitrySidorenkoShim](https://avatars.githubusercontent.com/u/8822805?v=4)](https://github.com/DmitrySidorenkoShim "DmitrySidorenkoShim (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (2 commits)")[![cambuildr](https://avatars.githubusercontent.com/u/113611242?v=4)](https://github.com/cambuildr "cambuildr (1 commits)")

### Embed Badge

![Health badge](/badges/campaigningsoftware-cf-repository-generator/health.svg)

```
[![Health](https://phpackages.com/badges/campaigningsoftware-cf-repository-generator/health.svg)](https://phpackages.com/packages/campaigningsoftware-cf-repository-generator)
```

###  Alternatives

[laravel/octane

Supercharge your Laravel application's performance.

4.0k26.6M222](/packages/laravel-octane)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M987](/packages/statamic-cms)[bagisto/bagisto

Bagisto Laravel E-Commerce

27.6k172.1k9](/packages/bagisto-bagisto)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k14.2M62](/packages/knuckleswtf-scribe)[laravel/nightwatch

The official Laravel Nightwatch package.

36210.1M36](/packages/laravel-nightwatch)[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11223.5M33](/packages/anourvalar-eloquent-serialize)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
