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

v13.0.0(1mo ago)01.6k—6.7%MITPHPPHP ^8.3

Since May 21Pushed 1mo agoCompare

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

READMEChangelog (2)Dependencies (10)Versions (6)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

48

—

FairBetter than 94% of packages

Maintenance94

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% 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 ~212 days

Total

3

Last Release

30d ago

Major Versions

v11.0.0 → v12.0.02026-02-06

v12.0.0 → v13.0.02026-07-20

### 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)")[![hdomos](https://avatars.githubusercontent.com/u/405760?v=4)](https://github.com/hdomos "hdomos (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.0k28.5M262](/packages/laravel-octane)[statamic/cms

The Statamic CMS Core Package

4.9k3.8M1.2k](/packages/statamic-cms)[bagisto/bagisto

Bagisto Laravel E-Commerce

28.0k175.2k9](/packages/bagisto-bagisto)[laravel/nightwatch

The official Laravel Nightwatch package.

36911.6M45](/packages/laravel-nightwatch)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54686.7k25](/packages/solspace-craft-freeform)[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

11.3k4.0k](/packages/leantime-leantime)

PHPackages © 2026

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