Download the PHP package jaocero/activity-timeline without Composer
On this page you can find all versions of the php package jaocero/activity-timeline. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jaocero/activity-timeline
More information about jaocero/activity-timeline
Files in jaocero/activity-timeline
Package activity-timeline
Short Description Beautiful activity timelines for Filament infolists, pages and actions, with first-class support for Spatie Activitylog.
License MIT
Homepage https://github.com/jaocero/activity-timeline
Informations about the package activity-timeline
Activity Timeline
Beautiful activity timelines for Filament infolists, pages and actions, with first-class support for Spatie Activitylog.
Requirements
- PHP 8.2+
- Laravel 11.28+
- Filament v4.x or v5.x
- A custom Filament theme (Tailwind CSS v4)
- Optional:
spatie/laravel-activitylogv4.10+ or v5.x for the activity log integration
Installation
Add the plugin's views to your custom theme's CSS file (usually resources/css/filament/admin/theme.css), then rebuild your assets:
Usage
Wrap the timeline entries in an ActivitySection. It works like a RepeatableEntry: give it the key of an array (or relationship) and describe each item with the timeline entries.
ActivityTitle, ActivityDescription, ActivityDate and ActivityBadge extend Filament's TextEntry, so formatStateUsing(), placeholder(), html(), markdown(), limit(), date(), since(), dateTooltip() and friends all work. ActivityIcon extends IconEntry. Any other entry you add to the schema (for example a TextEntry) is rendered below the item.
Items without an icon get a colored dot. HTML is escaped unless you call html(), and html() output is sanitized.
Entries
| Entry | Shows |
|---|---|
ActivityIcon |
The node on the rail. icon(), color() and animation(IconAnimation::Ping \| Spin \| Pulse \| Bounce) |
ActivityTitle |
The title |
ActivityDescription |
Text below the title |
ActivityDate |
The date, right aligned. relative() shows "2 hours ago" with the full date in a tooltip |
ActivityBadge |
A pill next to the title. Defaults to colors for created, updated, deleted and restored |
ActivityCauser |
An avatar (or initials) next to the title. Accepts a model, a name, or ['name' => ..., 'avatar' => ...]. showName() |
ActivityChanges |
A before → after list from ['old' => [...], 'attributes' => [...]]. attributeLabels(), formatValueUsing(), only(), except() |
Section options
Spatie Activitylog
Install and set up spatie/laravel-activitylog, then add LogsActivity to your models. Both v4 and v5 are supported.
In any infolist
ActivityLogSection loads the activities of the infolist's record, with icons, causer avatars, event badges, relative dates and a changes list already configured:
It can be customized:
In a slide-over
On a resource page
Create a page that extends ActivityTimelinePage, and register it with a route containing {record}:
Styling
The timeline uses Filament's own section, badge, link and avatar styles, so it follows your panel's colors and dark mode. Every element has a CSS hook class for customization:
fi-timeline, fi-timeline-compact, fi-timeline-section, fi-timeline-list, fi-timeline-group-label, fi-timeline-item, fi-timeline-item-rail, fi-timeline-item-node, fi-timeline-item-icon, fi-timeline-item-dot, fi-timeline-item-content, fi-timeline-item-header, fi-timeline-item-causer, fi-timeline-item-title, fi-timeline-item-badge, fi-timeline-item-date, fi-timeline-item-description, fi-timeline-item-changes, fi-timeline-item-change, fi-timeline-item-change-old, fi-timeline-item-change-new, fi-timeline-item-extras, fi-timeline-show-more, fi-timeline-load-more, fi-timeline-empty-state.
All strings can be translated by publishing the translations:
Upgrading
From v1.x (Filament v3)
- Requires Filament v4 or v5. Infolists are now schemas: change
activityInfolist(Infolist $infolist): InfolisttoactivityInfolist(Schema $schema): Schema. - Replace the
tailwind.config.jscontent path with the@sourceline above. modifyState()andallowHtml()still work, but are deprecated in favor of Filament'sformatStateUsing()andhtml(). HTML is now sanitized.ActivityTimelinePage::configuration()still works and only needs the keys you change. It is deprecated in favor ofconfigureActivitySection()andmodifyActivitiesQuery().- The page now shows the activities 20 at a time with a "Load older activities" button, uses relative dates, groups by day and is no longer
asideby default. Set'aside' => trueor'date' => 'F j, Y g:i A'inconfiguration()to restore the old look. - Spatie Activitylog v5 is supported: changes are read from
attribute_changes, and frompropertieson v4.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Jay-Are Ocero
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of activity-timeline with dependencies
filament/filament Version ^4.0|^5.0
filament/infolists Version ^4.0|^5.0
illuminate/contracts Version ^11.28|^12.0|^13.0
spatie/laravel-package-tools Version ^1.15.0