Skip to content

Customisation ​

You can customise most of the parts to fit your needs.

Labels / Translations ​

Labels are stored in language files and can be overwritten by creating files in the lang/vendor/filament-changelog/[LOCALE] directory.

For example, to edit the page heading create lang/vendor/filament-changelog/[LOCALE]/page.php, and set the heading key.

See the Laravel Docs on how work with translation strings. Refer to vendor/pxlrbt/filament-changelog/lang/en/ for all available files and translation keys.

Overriding Views ​

You can override the views by publishing the package views to your resources folder. For example you can customize the release feed by overriding/copying partials/releases.blade.php to resources/views/vendor/filament-changelog/partials/releases.blade.php.

Release Asset Storage ​

If you want to change the storage directory for the cached GitHub assets and the images of Markdown files, publish the config file and change the storage config. By default it uses public disk and the changelog directory.

shell
php artisan vendor:publish --provider="pxlrbt\FilamentChangelog\FilamentChangelogServiceProvider" --tag="config"

Filtering Releases ​

Sometimes you may want to filter the releases that are displayed in the changelog. You can do so by using the Changelog::filterReleasesUsing() method in a service provider.

php
Changelog::filterReleasesUsing(function (Release $release) {
    return version_compare(trim($release->tag, 'v'), '1.4.8', '>');
});

Custom Connector ​

To read releases from somewhere else, implement the Connector interface and pass it to the plugin. releases() returns the releases newest first. cacheKey() must be unique per source, because every connector is cached separately.

php
use Illuminate\Support\Collection;
use pxlrbt\FilamentChangelog\Connectors\Connector;
use pxlrbt\FilamentChangelog\DataObjects\Release;

class DatabaseConnector implements Connector
{
    public function releases(): Collection
    {
        return ReleaseNote::query()
            ->latest('published_at')
            ->get()
            ->map(fn (ReleaseNote $note) => new Release(
                id: $note->id,
                name: $note->version,
                tag: $note->version,
                body: $note->markdown,
                assets: [],
                created_at: $note->created_at->toDateString(),
                published_at: $note->published_at->toDateString(),
            ));
    }

    public function cacheKey(): string
    {
        return 'database';
    }
}

ChangelogPlugin::make()->connector(new DatabaseConnector);