PHPackages                             mydnic/changelog-commit-for-laravel - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mydnic/changelog-commit-for-laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mydnic/changelog-commit-for-laravel
===================================

Automatically generate a changelog inside your Laravel App based on your commit descriptions

v1.0.0(1y ago)15.4k1MITPHPPHP ^8.2CI passing

Since Sep 1Pushed 1w ago1 watchersCompare

[ Source](https://github.com/mydnic/changelog-commit-for-laravel)[ Packagist](https://packagist.org/packages/mydnic/changelog-commit-for-laravel)[ Docs](https://github.com/mydnic/changelog-commit-for-laravel)[ GitHub Sponsors](https://github.com/mydnic)[ RSS](/packages/mydnic-changelog-commit-for-laravel/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (4)Dependencies (12)Versions (7)Used By (0)

Automatic Changelog Generator for Laravel Applications
======================================================

[](#automatic-changelog-generator-for-laravel-applications)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1cf25171101298700ed3de308142f7bc628cf3e1d52aecbbe50d35b74d7904e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d79646e69632f6368616e67656c6f672d636f6d6d69742d666f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mydnic/changelog-commit-for-laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/2f65f8eb292ca74fd55b37130712b52373931553c47a284ee8c134a7d29b7faf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d79646e69632f6368616e67656c6f672d636f6d6d69742d666f722d6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/mydnic/changelog-commit-for-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/02cc7b5092a0f2faae3e22ff45c94fdb54c00195134270bc52d634751ebe2681/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d79646e69632f6368616e67656c6f672d636f6d6d69742d666f722d6c61726176656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/mydnic/changelog-commit-for-laravel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/e5ff6d948c87cffd492f1e3c05512c104d75721f52ebd01b82aea51e641da336/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d79646e69632f6368616e67656c6f672d636f6d6d69742d666f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mydnic/changelog-commit-for-laravel)

Automatically generate a changelog for your users inside your Laravel App based on your commit descriptions.

Introduction
------------

[](#introduction)

When building a web project, it's important to let your users know what changed in each release, or even as soon as a bug is fixed. You might do that through a blog post, or on social media, but it's still a manual process.

This package will automatically generate a changelog based on your commit descriptions. It will fetch the commit history from your repository and store the messages from your commit descriptions in a database table.

You can then display the changelog in your app, or even send it to your users via email.

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

[](#installation)

You can install the package via composer:

```
composer require mydnic/changelog-commit-for-laravel
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="changelog-commit-for-laravel-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="changelog-commit-for-laravel-config"
```

This is the contents of the published config file:

```
return [
    /**
     * The name of the table to store the changelog in.
     */
    'table_name' => 'changelogs',

    /**
     * The GitHub access token to use to fetch the commit history.
     */
    'github_access_token' => env('GITHUB_ACCESS_TOKEN'),

    /**
     * The GitHub repositories to fetch the commit history from.
     */
    'github_repositories' => [
        'mydnic/changelog-commit-for-laravel', // change me
        // other repositories if you want to fetch the commit history from multiple repositories
        // To specify a branch, make it an array like this one below:
        // [ 'mydnic/changelog-commit-for-laravel', 'main' ]
    ],
];
```

When you are not specifying a branch, it will use the default `main` branch.

Usage
-----

[](#usage)

Once the package is installed on your project, you should add the `changelog:fetch` command to your deployment process.

Now, every time your application is deployed, the changelog will be updated with the latest commit messages.

### Write your commit messages

[](#write-your-commit-messages)

Here's an example of a commit message:

```
fix: issue with authentication

> You can now login without any issue
> Enjoy!

```

As you can see, the commit message is composed of several lines. The first line is your usual commit message. The other lines can be used to add more details about the commit.

But only the other lines starting with `>` will be used to generate the changelog.

### Generate the changelog

[](#generate-the-changelog)

After you've pushed your commits, you can run the following command to fetch the commit history. Or you can add this command to your deployment process so you don't have to run it manually.

```
php artisan changelog:fetch
```

This will fetch the commit history from your repository and store the messages (all lines starting with `>`) from your commit descriptions in a database table.

### Showing the changelog

[](#showing-the-changelog)

You can then display the changelog in your app, or even send it to your users via email.

Here's an example of how to display the changelog in your app:

Use the `Changelog` model to fetch the changelog entries in your application.

```
use Mydnic\ChangelogCommitForLaravel\Models\Changelog;

$changelogs = Changelog::latest('date')->paginate(50);

return view('changelog', compact('changelogs'));
// or return JSON response
return response()->json($changelogs);
```

### Front End Examples

[](#front-end-examples)

Please submit more examples if you have any!

#### VueJS Component

[](#vuejs-component)

```

                {{ $filters.format(date, 'dddd DD MMM YYYY') }}

                    {{ item.message }}

                Load more...

import { defineComponent } from 'vue'

export default defineComponent({
    data () {
        return {
            changelog: [],
            pagination: {}
        }
    },

    computed: {
        groupedChangelog () {
            return this.changelog.reduce((acc, item) => {
                const key = item.date
                if (!acc[key]) {
                    acc[key] = []
                }
                acc[key].push(item)
                return acc
            }, {})
        }
    },

    created () {
        this.getChangelog()
    },

    methods: {
        getChangelog (page = 1) {
            fetch('https://your-app.example/api/changelog?page=' + page)
                .then(response => response.json())
                .then((data) => {
                    this.changelog = [...this.changelog, ...data.data]
                    this.pagination = {
                        current_page: data.current_page,
                        last_page: data.last_page
                    }
                })
        },

        loadMore () {
            this.getChangelog(this.pagination.current_page + 1)
        }
    }
})

```

#### Laravel Blade

[](#laravel-blade)

```
class ChangelogController
{
    public function __invoke()
    {
        $changelog = DB::table(config('changelog-commit-for-laravel.table_name'))
            ->select('message', 'date', 'branch')
            ->orderBy('date', 'desc')
            ->paginate(10);

        // Group by date
        $groupedChangelog = $changelog->getCollection()->groupBy('date');

        return view('changelog', [
            'groupedChangelog' => $groupedChangelog,
            'pagination' => $changelog // Pass pagination object
        ]);
    }
}
```

```

    @foreach ($groupedChangelog as $date => $items)

            {{ \Carbon\Carbon::parse($date)->translatedFormat('l d M Y') }}

            @foreach ($items as $item)

                    {{ $item->message }}

            @endforeach

    @endforeach

    {{-- Laravel Pagination Links --}}

        {{ $pagination->links() }}

```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Clément Rigo](https://github.com/mydnic)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance72

Regular maintenance activity

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63% 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 ~42 days

Total

4

Last Release

545d ago

Major Versions

v0.1.0 → v1.0.02025-01-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc52c3eeee29c610da76c047b3cec562c062ebb747e5e3ef097677373269b7e4?d=identicon)[mydnic](/maintainers/mydnic)

---

Top Contributors

[![mydnic](https://avatars.githubusercontent.com/u/2733767?v=4)](https://github.com/mydnic "mydnic (34 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (13 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")[![MarkCorazon](https://avatars.githubusercontent.com/u/22059464?v=4)](https://github.com/MarkCorazon "MarkCorazon (2 commits)")

---

Tags

laravelmydnicchangelog-commit-for-laravel

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mydnic-changelog-commit-for-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/mydnic-changelog-commit-for-laravel/health.svg)](https://phpackages.com/packages/mydnic-changelog-commit-for-laravel)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)

PHPackages © 2026

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